Esempio n. 1
0
        public void SelectJson(int payApplyId)
        {
            int pageIndex = 1, pageSize = 100;
            string orderStr = string.Empty, whereStr = string.Empty;

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            NFMT.Funds.BLL.PayApplyBLL bll = new NFMT.Funds.BLL.PayApplyBLL();
            NFMT.Common.SelectModel select = bll.GetSelectedSelect(pageIndex, pageSize, orderStr, payApplyId);

            NFMT.Common.IAuthority auth = new NFMT.Common.BasicAuth();
            NFMT.Common.ResultModel result = bll.Load(user, select,auth);

            int totalRows = result.AffectCount;
            System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable;
            if (dt != null)
            {
                foreach (System.Data.DataRow dr in dt.Rows)
                {
                    if (dt.Rows.IndexOf(dr) > 0) { this.Sids += ","; }
                    if (dr["StockId"] != DBNull.Value)
                    {
                        int stockId = Convert.ToInt32(dr["StockId"]);
                        this.Sids += stockId.ToString();
                    }
                }
            }

            this.SelectedJson = Newtonsoft.Json.JsonConvert.SerializeObject(dt, new Newtonsoft.Json.Converters.DataTableConverter());
        }
Esempio n. 2
0
        public void SelectJson(int payApplyId)
        {
            int pageIndex = 1, pageSize = 100;
            string orderStr = string.Empty, whereStr = string.Empty;

            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            NFMT.Funds.BLL.PayApplyBLL bll = new NFMT.Funds.BLL.PayApplyBLL();
            NFMT.Common.SelectModel select = bll.GetSelectedSelect(pageIndex, pageSize, orderStr, payApplyId);
            NFMT.Common.ResultModel result = bll.Load(user, select,new NFMT.Common.BasicAuth());

            int totalRows = result.AffectCount;
            System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable;

            this.SelectedJson = Newtonsoft.Json.JsonConvert.SerializeObject(dt, new Newtonsoft.Json.Converters.DataTableConverter());
        }