Ejemplo n.º 1
0
        private string SaleDefToExcel(string BeginDate, string EndDate)
        {
            DataSet ds      = new ZhangWei.BLL.Sale_Detail().GetSaleDefinite(BeginDate, EndDate);
            string  ToExcel = new LTP.Common.DataToExcel().OutputExcel(ds.Tables[0], "销售明细 " + BeginDate + "—" + EndDate, HttpContext.Current.Server.MapPath("/ExcelFiles/"), "销售明细");

            return(ToExcel);
        }
Ejemplo n.º 2
0
 private string SaleGatToExcel(string BeginDate, string EndDate, string according)
 {
     if (according == "1")
     {
         DataSet ds      = new ZhangWei.BLL.Sale_Detail().GetSaleGather(BeginDate, EndDate);
         string  ToExcel = new LTP.Common.DataToExcel().OutputExcel(ds.Tables[0], "销售汇总(按品种) " + BeginDate + "—" + EndDate, HttpContext.Current.Server.MapPath("/ExcelFiles/"), "销售汇总(按品种)");
         return(ToExcel);
     }
     else
     {
         DataSet ds      = new ZhangWei.BLL.Sale_Detail().GetGatherByList(BeginDate, EndDate);
         string  ToExcel = new LTP.Common.DataToExcel().OutputExcel(ds.Tables[0], "销售汇总(按单号) " + BeginDate + "—" + EndDate, HttpContext.Current.Server.MapPath("/ExcelFiles/"), "销售汇总(按单号)");
         return(ToExcel);
     }
 }
Ejemplo n.º 3
0
        private string StockToExcel(Int32 StoreHouse_ID)
        {
            DataSet ds      = new ZhangWei.BLL.StockPile().CheckStock(StoreHouse_ID);
            string  ToExcel = new LTP.Common.DataToExcel().OutputExcel(ds.Tables[0], "库存盘点 " + DateTime.Now.ToString(), HttpContext.Current.Server.MapPath("/ExcelFiles/"), "库存盘点");

            ZhangWei.BLL.HasChecked   bl_hc = new ZhangWei.BLL.HasChecked();
            ZhangWei.Model.HasChecked ml_hc = bl_hc.GetModel(bl_hc.GetMaxId() - 1);
            DateTime dt            = DateTime.Now;
            DateTime LastCheckTime = ml_hc.Month;

            if (dt.Month > LastCheckTime.Month)
            {
                ml_hc.Month = dt;
                bl_hc.Add(ml_hc);
            }
            else
            {
                ml_hc.Month = dt;
                bl_hc.Update(ml_hc);
            }
            return(ToExcel);
        }