public static Ui.DataGrid GetCKAccpetUserGridByKeywords(string Keywords, string orderBy, long startRowIndex, int pageSize) { long totalRows = 0; List <SqlParameter> parameters = new List <SqlParameter>(); List <string> conditions = new List <string>(); conditions.Add("1=1"); if (!string.IsNullOrEmpty(Keywords)) { conditions.Add("([AccpetUserName] like @Keywords)"); parameters.Add(new SqlParameter("@Keywords", "%" + Keywords + "%")); } string fieldList = "[CKAccpetUser].*"; string Statement = " from [CKAccpetUser] where " + string.Join(" and ", conditions.ToArray()); CKAccpetUser[] list = new CKAccpetUser[] { }; list = GetList <CKAccpetUser>(fieldList, Statement, parameters, orderBy, startRowIndex, pageSize, out totalRows).ToArray(); DataAccess.Ui.DataGrid dg = new Ui.DataGrid(); dg.rows = list; dg.total = totalRows; dg.page = pageSize; return(dg); }
private void SetInfo(Foresight.DataAccess.CKAccpetUser data) { this.tdAcceptUserName.Value = data.AccpetUserName; }