public void SelectJson(NFMT.Invoice.Model.BusinessInvoice businessInvoice, NFMT.Invoice.InvoiceDirectionEnum direction) { int pageIndex = 1, pageSize = 100; string orderStr = string.Empty, whereStr = string.Empty; NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; NFMT.Common.SelectModel select = new NFMT.Common.SelectModel(); NFMT.Invoice.BLL.BusinessInvoiceBLL bll = new NFMT.Invoice.BLL.BusinessInvoiceBLL(); select = bll.GetProvisionalContractStockListSelect(pageIndex, pageSize, orderStr, businessInvoice.SubContractId, businessInvoice.BusinessInvoiceId, false, false); NFMT.Common.ResultModel result = bll.Load(user, select, NFMT.Common.DefaultValue.ClearAuth); System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable; this.SubJson = Newtonsoft.Json.JsonConvert.SerializeObject(dt, new Newtonsoft.Json.Converters.DataTableConverter()); select = bll.GetProvisionalContractStockListSelect(pageIndex, pageSize, orderStr, businessInvoice.SubContractId, businessInvoice.BusinessInvoiceId, false, true); result = bll.Load(user, select, NFMT.Common.DefaultValue.ClearAuth); dt = result.ReturnValue as System.Data.DataTable; this.InvJson = Newtonsoft.Json.JsonConvert.SerializeObject(dt, new Newtonsoft.Json.Converters.DataTableConverter()); }
public void SelectJson(int subId, NFMT.Invoice.InvoiceDirectionEnum direction) { int pageIndex = 1, pageSize = 100; string orderStr = string.Empty, whereStr = string.Empty; NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser; NFMT.Common.SelectModel select = new NFMT.Common.SelectModel(); NFMT.Invoice.BLL.BusinessInvoiceBLL bll = new NFMT.Invoice.BLL.BusinessInvoiceBLL(); select = bll.GetProvisionalContractStockListSelect(pageIndex, pageSize, orderStr, subId); NFMT.Common.ResultModel result = bll.Load(user, select); 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()); }