Exemplo n.º 1
0
        private string GetProductInMainJson(HttpContext context)
        {
            var returnJson  = "[]";
            var managerMain = new CASE_PRODUCTIN_MAINManager(this.dbHelper, Utils.UserInfo);

            var where = "DELETEMARK = 0";
            var pageParam = new PageParam(context);

            if (!string.IsNullOrEmpty(pageParam.Filter))
            {
                where = pageParam.Filter;
            }
            int recordCount;
            var dtProductIn = managerMain.GetDTByPage(out recordCount, pageParam.PageIndex, pageParam.PageSize, where, pageParam.SortField + " " + pageParam.Order); //RDIFrameworkService.Instance.RDIFrameworkDBProviderService.Fill(Utils.UserInfo, sql);

            if (dtProductIn != null && dtProductIn.Rows.Count > 0)
            {
                returnJson = JSONhelper.FormatJSONForEasyuiDataGrid(recordCount, dtProductIn);
            }

            return(returnJson);
        }
Exemplo n.º 2
0
        private string GetProductMultiPage(HttpContext context)
        {
            var returnJson  = "[]";
            var managerMain = new CASE_PRODUCTIN_MAINManager(this.dbHelper, Utils.UserInfo);
            var pageParam   = new PageParam(context);
            int recordCount;

            managerMain.CurrentTableName = @"(SELECT tab1.ID,tab1.CODE,tab1.INDATE,tab1.INTYPE,tab1.CUSTODIAN,tab1.CREATEON,tab2.FULLNAME,tab2.AMOUNT,tab2.UNITPRICE 
                                                FROM CASE_PRODUCTIN_MAIN tab1 
                                                INNER JOIN CASE_PRODUCTIN_DETAIL tab2
                                                ON tab1.ID = tab2.CASE_PRODUCTIN_MAIN_ID) pageData";

            managerMain.SelectField = "*";
            var dtProductIn = managerMain.GetDTByPage(out recordCount, pageParam.PageIndex, pageParam.PageSize, null, "CREATEON DESC");

            if (dtProductIn != null && dtProductIn.Rows.Count > 0)
            {
                returnJson = JSONhelper.FormatJSONForEasyuiDataGrid(recordCount, dtProductIn);
            }

            return(returnJson);
        }