示例#1
0
        public static Ui.DataGrid GetPaySummaryGridByKeywords(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");
            #region 关键字查询
            string cmd = string.Empty;
            if (!string.IsNullOrEmpty(Keywords))
            {
                conditions.Add("[PayName] like @Keywords");
                parameters.Add(new SqlParameter("@Keywords", "%" + Keywords + "%"));
            }
            #endregion
            string       fieldList = "[PaySummary].*";
            string       Statement = " from [PaySummary] where  " + string.Join(" and ", conditions.ToArray()) + cmd;
            PaySummary[] list      = new PaySummary[] { };
            list = GetList <PaySummary>(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);
        }
示例#2
0
 private void SetInfo(Foresight.DataAccess.PaySummary data)
 {
     this.tdPayName.Value             = data.PayName;
     this.tdRemark.Value              = data.Remark;
     this.tdRelateFeeType_Pay.Checked = data.RelateFeeType_Pay;
 }