DataTable IBLL.IInOutBLL.GetOtherInOutList(DateTime date1, DateTime date2, string trans_no) { ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("date1", date1.ToString("yyyy-MM-dd")); w.Append("date2", date2.ToString("yyyy-MM-dd")); w.Append("trans_no", trans_no); Helper.IRequest req = new Helper.Request(); var json = req.request("/inout?t=get_other_inout_list", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }
DataTable ICommonBLL.GetPeopleList() { ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("page_index", "1"); w.Append("page_size", "10000"); w.Append("dep_no", ""); w.Append("show_stop", "0"); w.Append("keyword", ""); Helper.IRequest req = new Helper.Request(); var json = req.request("/people?t=get_list", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }
System.Data.DataTable IBLL.ICusPriceOrder.GetList(DateTime date1, DateTime date2) { ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("date1", date1.ToString("yyyy-MM-dd")); w.Append("date2", date2.ToString("yyyy-MM-dd")); Helper.IRequest req = new Helper.Request(); var json = req.request("/cus_price_order?t=get_list", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }
void IBLL.IInOutBLL.GetOtherInOut(string sheet_no, out DataTable tb1, out DataTable tb2) { ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("sheet_no", sheet_no); Helper.IRequest req = new Helper.Request(); var json = req.request("/inout?t=get_other_inout", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("tb1").Length < 10) { throw new Exception("不存在单据!"); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); tb1 = bll.GetDataTable(r.ReadList("tb1")); tb2 = bll.GetDataTable(r.ReadList("tb2")); } }
DataTable IBLL.ICheckBLL.GetCheckInitList() { Helper.IRequest req = new Helper.Request(); var json = req.request("/check?t=get_check_init_list", ""); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }
DataTable ICommonBLL.GetBranchList() { ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("code_len", "4"); Helper.IRequest req = new Helper.Request(); var json = req.request("/branch?t=get_list", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }
DataTable IBLL.ICheckBLL.GetBranchStockList(string branch_no) { Helper.IRequest req = new Helper.Request(); ReadWriteContext.IWriteContext w = new ReadWriteContext.WriteContextByJson(); w.Append("branch_no", branch_no); var json = req.request("/check?t=get_branch_stock_list", w.ToString()); ReadWriteContext.IReadContext r = new ReadWriteContext.ReadContextByJson(json); if (r.Read("errId") != "0") { throw new Exception(r.Read("errMsg")); } else { if (r.Read("data").Length < 10) { return(new DataTable()); } IBLL.ICommonBLL bll = new BLL.CommonBLL(); var tb = bll.GetDataTable(r.ReadList("data")); return(tb); } }