![]() | CYQ.Data componentsCYQ.Data support multi-database application [Txt,Xml,Access, MSSQL, Oracle,SQLite,MySql], help easily and quickly to develop your project |
CYQ.Data Components Getting Started Guide [Part 2]-[MAction Data Query- Fill And Select]
Guide |
|
|
| #TopicOwner |
In this section: [with * content for the new version of the performance function, the old version might not have this feature] Benpian continue on a content, this section describes the use of all relevant queries.
Main Summary:
1: Fill one-line data manipulation operations and GetCount, Exists (*) operation.
2: Select multiple lines of data manipulation operations
3: list-bound controls operate with the paging controls
4: multi-table query and bind the view and custom SQL
Single data operation I:Fill - a single query Method Prototype:public bool Fill(object where) Example 1: Direct ID using(MAction action = new MAction(TableNames.Users))
{
if (action.Fill(888))//Query ID = 888 one-way data { action.SetTo(lblUserName); } } Example 2: where conditions for transmission using(MAction action = new MAction(TableNames.Users))
{
if (action.Fill("id=888 or UserName='cyqdata"))//Query ID=888 or UserName is "cyqdata" one-way data {
action.SetTo(lblUserName); } } Example 3: where conditions are attached order by using(MAction action = new MAction(TableNames.Users))
{
if (action.Fill("id>888 order by id desc"))//Query ID>888' result,ID to take the results of the largest single data {
action.SetTo(lblUserName); } } Example 4: MDataRow line data transfer entity using(MAction action = new MAction(TableNames.Users))
{ }if (action.Fill("888")) { UserInfo info=action.Data.ToEntity<UserInfo>();//UserInfo transfer entity。 } II:GetCount -Take the total number of statistics Method Prototype:public int GetCount(string where)
Example : using(MAction action = new MAction(TableNames.Users))
{ int count=action.GetCount("id>10"); } III:Exists - The existence of the conditions specified data (*) Method Prototype:public int Exists(string where) Example : using(MAction action = new MAction(TableNames.Users))
{ bool userExists=action.Exists("UserName='cyqdata'"); }
Multi-line data manipulation Ⅳ:Select - Multiple Data Query Method Prototype:
1:public MDataTable Select() 2:public MDataTable Select(string where)(*) 3:public MDataTable Select(int PageIndex, int PageSize, string Where, out int RowCount) Example 1: using(MAction action = new MAction(TableNames.Users))
{ MDataTable tabme = action.Select();//Select All Data } Example 2: using(MAction action = new MAction(TableNames.Users))
{ MDataTable tabme = action.Select("id>10 order by id desc");//Select data by where } Example 3: int count;// return record count
using(MAction action = new MAction(TableNames.Users))
{
MDataTable tabme = action.Select(1,10,"id>10 order by id desc",out count); //Select Data by where and with pager
}
List of bind operation
Ⅴ:Bind To GridView/DataList/Repeater Example 1: Select All And Bind To List Control using(MAction action = new MAction(TableNames.Users))
{ action.Select().Bind(gvUsers); } Example 2:Bind with paging controls [Down Paging Control:http://www.cyqdata.cn/download/article-detail-28683] public void BindData()
{ int count; using(MAction action = new MAction(TableNames.Users))
{
action.Select(Pager1.PageIndex,Pager1.PageSize,"id>10 order by id desc",out count).Bind(gvUsers); } Pager1.Count = count;//Set Record Count
Pager1.BindName = "BindData";//Bind Method Name,Symbols need to modify Public }
Multi-table query and bind Ⅵ:View Way Example 1:And operation of the same table, the only difference is the name of the table name into view using(MAction action = new MAction(ViewNames.V_Users))
{ MDataTable tabme = action.Select();//Select All View Data }
Ⅶ:Multi-table query: Customize multi-table SQL statement construct Example 1: public void BindData()
{ string customTable = "(select u.*,m.Body from Users u left join Message m on u.ID=m.UserID) v";
int count; using(MAction action = new MAction(customTable))
{
action.Select(Pager1.PageIndex,Pager1.PageSize,"id>10 order by id desc",out count).Bind(gvUsers); } Pager1.Count = count;
Pager1.BindName = "BindData";
} Description: In the specific use, in order to facilitate the management, directly in a custom SQL statement is not written directly in the interface so, you can build a new item unified project management custom SQL. Chinese version of the link:http://www.cyqdata.cn/cyqdata/article-detail-412 More tutorials: 1:CYQ.Data Components Getting Started Guide [Part 1] 2:CYQ.Data Components Getting Started Guide [Part 2]-[MAction Data Query- Fill And Select] 3:CYQ.Data Components Getting Started Guide [Part 3]-[MAction Get And Set Value] 4:CYQ.Data Components Getting Started Guide [Part 4]-[MAction Insert Delete Update] 5:CYQ.Data Components Getting Started Guide [Part 5]-[MProc Execute Stored Procedures or SQL] ![]() |
Anderson[176.31.68.*]2012/6/6 11:01:34 | #1 | |
![]() | altazar / Проверил сейчас. Прежний HUD возвращается, если удалить файлы мода.Steam/steamapps/common/skyrim/Data/Interface. Оттуда удали папку exported и файл faemtirvsoenu |
Post Comment
Bulletin
Article Search
Categories
- Platform for dynamic (20)
- Feedback (9)
- Guide (33)
- Principles (19)
- Project-Case (8)
- Business & Buy (2)
- Technology exchange (45)
New Article
- CYQ.Data Components Getting Started Guide [Part 5]-[MProc Execute Stored Procedures or SQL]
- CYQ.Data Components Getting Started Guide [Part 4]-[MAction Insert Delete Update]
- CYQ.Data Components Getting Started Guide [Part 3]-[MAction Get And Set Value]
- CYQ.Data Components Getting Started Guide [Part 2]-[MAction Data Query- Fill And Select]
- CYQ.Data Components Getting Started Guide [Part 1]
New Comment
- When some one searches for his necessary thing, therefore he/she wishes to be available that in detail, so that thing is maintained over here.
- This is my first time pay a quick visit at here and i am in fact happy to read everthing at alone place.
- I truly appreciate this blog article.Really thank you! Cool.
- please pay a visit to the web sites we follow, like this one particular, as it represents our picks in the web
- Really enjoyed this post.Really thank you!
- Really enjoyed this article.Really looking forward to read more. Great.
- poker bonuses What are the norms of copyright of web content? How as it different from Patent?
- Wow! Thank you! I permanently needed to write on my blog something like that. Can I implement a fragment of your post to my site?
- This website was how do I say it? Relevant!! Finally I ave found something that helped me. Cheers!
- I was reading through some of your content on this internet site and I believe this web site is very informative ! Continue posting.