public IHttpActionResult GetFilters() { BLL.Report bll = new BLL.Report(); List <DTO.Support.Season> data = bll.GetSeasons(); return(Ok(new Library.DTO.ReturnData <List <DTO.Support.Season> >() { Data = data, Message = null, TotalRows = 0 })); }
public IHttpActionResult GetReportProformaInvoice(string season) { Library.DTO.Notification notification; // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.Report bll = new BLL.Report(); string reportFileName = bll.GetReportProformaInvoice(season, ControllerContext.GetAuthUserId(), out notification); return(Ok(new Library.DTO.ReturnData <string>() { Data = reportFileName, Message = notification })); }
public void Request(string t, string pars, out string res) { WebHelper w = new WebHelper(pars); IBLL.IReport reportBll = new BLL.Report(); try { /* * if (!w.ExistsKeys("page_index", "page_size")) * { * throw new Exception("参数错误!"); * } * DateTime start_time = w.ObjectToDate("start_time"); * DateTime end_time = w.ObjectToDate("end_time"); * int page_index = w.ObjectToInt("page_index"); * int page_size = w.ObjectToInt("page_size"); * int total_count = 0; * DataTable tb; * if (t.Equals("GetCGSum")) * { * string branch_no = w.ObjectToString("branch_no"); * tb = reportBll.GetCGSum(start_time, end_time, branch_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetCGDetail")) * { * string branch_no = w.ObjectToString("branch_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string supcust_no = w.ObjectToString("supcust_no"); * string trans_no = w.ObjectToString("trans_no"); * tb = reportBll.GetCGDetail(start_time, end_time, branch_no, sheet_no, supcust_no, trans_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetSaleSum")) * { * string branch_no = w.ObjectToString("branch_no"); * tb = reportBll.GetSaleSum(start_time, end_time, branch_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetSaleDetail")) * { * string branch_no = w.ObjectToString("branch_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string cust_no = w.ObjectToString("cust_no"); * tb = reportBll.GetSaleDetail(start_time, end_time, branch_no, sheet_no, cust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetSaleOutDetail")) * { * string branch_no = w.ObjectToString("branch_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string supcust_no = w.ObjectToString("supcust_no"); * tb = reportBll.GetSaleOutDetail(start_time, end_time, branch_no, sheet_no, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetCusCredit")) * { * string supcust_no = w.ObjectToString("supcust_no"); * tb = reportBll.GetCusCredit(supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetNoSaleCus")) * { * tb = reportBll.GetNoSaleCus(start_time, end_time, page_index, page_size, out total_count); * } * else if (t.Equals("GetSheetPayInfo")) * { * string trans_no = w.ObjectToString("trans_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string supcust_no = w.ObjectToString("supcust_no"); * string type = w.ObjectToString("type"); * tb = reportBll.GetSheetPayInfo(start_time, end_time, trans_no, supcust_no, sheet_no, type, page_index, page_size, out total_count); * } * else if (t.Equals("GetICSum")) * { * string item_clsno = w.ObjectToString("item_clsno"); * string item_name = w.ObjectToString("item_name"); * string barcode = w.ObjectToString("barcode"); * string sup_no = w.ObjectToString("sup_no"); * string stock_qty = w.ObjectToString("stock_qty"); * tb = reportBll.GetICSum(item_clsno, item_name, barcode, sup_no, stock_qty, page_index, page_size, out total_count); * } * else if (t.Equals("GetICFlow")) * { * string branch_no = w.ObjectToString("branch_no"); * string str = w.ObjectToString("str"); * tb = reportBll.GetICFlow(start_time, end_time, branch_no, str, page_index, page_size, out total_count); * } * else if (t.Equals("GetICOutDetail")) * { * string branch_no = w.ObjectToString("branch_no"); * string item_name = w.ObjectToString("item_name"); * string sheet_no = w.ObjectToString("sheet_no"); * string item_clsno = w.ObjectToString("item_clsno"); * string barcode = w.ObjectToString("barcode"); * tb = reportBll.GetICOutDetail(start_time, end_time, branch_no, barcode, item_name, sheet_no, item_clsno, page_index, page_size, out total_count); * } * else if (t.Equals("GetJXCSum")) * { * string branch_no = w.ObjectToString("branch_no"); * string item_clsno = w.ObjectToString("item_clsno"); * string barcode = w.ObjectToString("barcode"); * string item_name = w.ObjectToString("item_name"); * tb = reportBll.GetJXCSum(start_time, end_time, branch_no, item_clsno, item_name, barcode, page_index, page_size, out total_count); * } * else if (t.Equals("GetPmDetail")) * { * string barcode = w.ObjectToString("barcode"); * string item_name = w.ObjectToString("item_name"); * tb = reportBll.GetPmDetail(start_time, end_time, barcode, item_name, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpCusSum")) * { * string supcust_no = w.ObjectToString("supcust_no"); * tb = reportBll.GetRpCusSum(start_time, end_time, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpCusDetail")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string deal_man = w.ObjectToString("deal_man"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpCusDetail(start_time, end_time, supcust_no, deal_man, sheet_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpSupSum")) * { * string supcust_no = w.ObjectToString("supcust_no"); * tb = reportBll.GetRpSupSum(start_time, end_time, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpSupDetail")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string deal_man = w.ObjectToString("deal_man"); * tb = reportBll.GetRpSupDetail(start_time, end_time, sheet_no, deal_man, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpSupAccount")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string oper_type = w.ObjectToString("oper_type"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpSupAccount(start_time, end_time, sheet_no, oper_type, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpCusAccount")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string oper_type = w.ObjectToString("oper_type"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpCusAccount(start_time, end_time, sheet_no, oper_type, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpTodayInc")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpTodayInc(sheet_no, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpTodayPay")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpTodayPay(sheet_no, supcust_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpCusFyDetail")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string kk_no = w.ObjectToString("kk_no"); * tb = reportBll.GetRpCusFyDetail(start_time, end_time, supcust_no, kk_no, sheet_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpSupFyDetail")) * { * string supcust_no = w.ObjectToString("supcust_no"); * string sheet_no = w.ObjectToString("sheet_no"); * string kk_no = w.ObjectToString("kk_no"); * tb = reportBll.GetRpSupFyDetail(start_time, end_time, supcust_no, kk_no, sheet_no, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpCashBank")) * { * string visa_id = w.ObjectToString("visa_id"); * tb = reportBll.GetRpCashBank(start_time, end_time, visa_id, page_index, page_size, out total_count); * } * else if (t.Equals("GetRpAdminCost")) * { * string type_no = w.ObjectToString("type_no"); * string sheet_no = w.ObjectToString("sheet_no"); * tb = reportBll.GetRpAdminCost(start_time, end_time, sheet_no, type_no, page_index, page_size, out total_count); * } * else * { * throw new Exception("请求地址错误"); * } * w.Write(tb); * w.Write("total_count", total_count); * w.WriteSuccess(); */ w.ReflectionMethod(reportBll, t); res = w.NmJson(); } catch (Exception ex) { w.WriteError(ex); res = w.NmJson(); } }