protected void btnRptPointRateExcel_Click(object sender, EventArgs e) { string strStartTime = this.txtStartTime.Value; string strEntTime = this.txtEndTime.Value; StringBuilder strTime = new StringBuilder(); string strSql = this.QueryCondition(); if (strStartTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME>='{0}'", strStartTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME>='{0}' ", strStartTime); } if (strEntTime != "") { this.strwhere.AppendFormat(" and POINTCREATETIME<='{0}'", strEntTime); strTime.AppendFormat(" and PointLOG.POINTCREATETIME<='{0}'", strEntTime); } PointRate bllPointRate = new PointRate(); int Counts = this.NetPagerParameter.RecordCount; strSql += "and MEM.MEMID<>0 AND MEM.MEMSHOPID=SYSSHOP.SHOPID"; strSql += " AND MEM.MEMLEVELID=MEMLEVEL.LEVELID"; strSql += " AND MEM.MEMUSERID=SYSUSER.USERID"; if (RptPointRate.MemCardId != null) { strSql += string.Format(" and Mem.MemCard={0}", RptPointRate.MemCardId); } strSql = PubFunction.GetShopAuthority(this._UserShopID, "MemShopID", strSql); DataTable db = bllPointRate.GetListSP(Counts, this.NetPagerParameter.CurrentPageIndex, out Counts, strTime.ToString(), new string[] { strSql }).Tables[0]; DataExcelInfo.PointRateExcel(db, this._UserName, this.strwhere.ToString()); }
protected void btnRptStaffMoneyExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); StringBuilder strDetail = new StringBuilder(); strSql += " and Staff.StaffClassID = StaffClass.ClassID and StaffClass.ClassShopID = SysShop.ShopID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "ClassShopID", strSql); StringBuilder strSb = new StringBuilder(); strSb.Append(" 1=1 "); if (this.txtStaffStartTime.Value != "") { strSb.AppendFormat(" and StaffMoney.StaffCreateTime>='{0}'", DateTime.Parse(this.txtStaffStartTime.Value)); strDetail.AppendFormat(" and StaffCreateTime>='{0}'", DateTime.Parse(this.txtStaffStartTime.Value)); } if (this.txtStaffEndTime.Value != "") { strSb.AppendFormat(" and StaffMoney.StaffCreateTime<='{0}'", DateTime.Parse(this.txtStaffEndTime.Value)); strDetail.AppendFormat(" and StaffCreateTime<='{0}'", DateTime.Parse(this.txtStaffEndTime.Value)); } DataTable dtStaff = this.bllStaff.GetListSP(100000, 1, out Counts, strSb.ToString(), new string[] { strSql }).Tables[0]; DataExcelInfo.StaffMoney(dtStaff, this._UserName, strDetail.ToString()); }
protected void BtnMemExpenseExcel_Click(object sender, EventArgs e) { Mem member = new Mem(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and Mem.MemShopID=SysShop.ShopID "; StringBuilder strSb = new StringBuilder(); StringBuilder strDetail = new StringBuilder(); strSb.Append(" 1=1 "); strDetail.Append(" 1=1 "); if (this.txtStartTime.Value != "") { strSb.AppendFormat(" and OrderLog.OrderCreateTime>='{0}'", this.txtStartTime.Value); strDetail.AppendFormat(" and OrderCreateTime>='{0}'", this.txtStartTime.Value); } if (this.txtEndTime.Value != "") { strSb.AppendFormat(" and OrderLog.OrderCreateTime<='{0}'", PubFunction.TimeEndDay(this.txtEndTime.Value)); strDetail.AppendFormat(" and OrderCreateTime<='{0}'", PubFunction.TimeEndDay(this.txtEndTime.Value)); } DataTable dtMemExpense = this.bllMem.GetMemExpense(1000000, 1, out Counts, strSb.ToString(), new string[] { strSql }).Tables[0]; DataExcelInfo.MemExpenseReportExcel(dtMemExpense, this._UserName, strDetail.ToString()); }
protected void btnGoodsNumberImport_Click(object sender, EventArgs e) { this.strSavePath = this.path.Value; if (File.Exists(this.strSavePath)) { if (this.bolMainIndex) { DataTable dtGoods = DataExcelInfo.CheckGoodsNumDataExcel(this.strSavePath); DataTable dtGoodsCopy = this.CheckGoodsNumData(dtGoods, true, this._UserShopID); if (DataExcelInfo.GoodsImportNums(dtGoodsCopy, this._UserID, this._UserShopID)) { base.OutputWarn("恭喜您,导入商品库存成功!"); this.strSavePath = ""; this.bolMainIndex = false; } else { File.Delete(this.strSavePath); base.OutputWarn("导入商品库存失败,请再次检验并改正商品数据!"); } } else { File.Delete(this.strSavePath); base.OutputWarn("您导入的商品库存数据还没有检验成功,请通过检验再导入商品数据。"); } } else { base.OutputWarn("您还没有检验商品库存数据,请先检验数据"); } }
protected void btnGoodsCheck_Click(object sender, EventArgs e) { lock (GoodsExcelIn._syncObj) { string strUploadPath = this.fileUploadGoods.FileName; this.strSavePath = base.Server.MapPath("~/Upload/Goods/Goods" + DateTime.Now.ToString("yyMMddHHmmssffff") + ".xls"); this.strPath.Value = this.strSavePath; if (strUploadPath == "") { base.OutputWarn("请先选择Excel文件。"); } else { string strFileFix = Path.GetExtension(strUploadPath).ToLower(); if (strFileFix != ".xls") { base.OutputWarn("选择文件的文件格式错误,请重新选择Excel文件。"); } else { if (!Directory.Exists(base.Server.MapPath("~/Upload/Goods"))) { Directory.CreateDirectory(base.Server.MapPath("~/Upload/Goods")); } if (File.Exists(this.strSavePath)) { File.Delete(this.strSavePath); } this.fileUploadGoods.PostedFile.SaveAs(this.strSavePath); } if (File.Exists(this.strSavePath)) { DataTable dtGoods = DataExcelInfo.CheckGoodsDataExcel(this.strSavePath); DataTable dtGoodsCopy = this.CheckGoodsData(dtGoods, false); this.GridView1.Visible = false; this.gvErrorGoods.Visible = true; this.Get_ParameterList(dtGoodsCopy); if (dtGoodsCopy.Rows.Count <= 0 && dtGoods.Rows.Count > 0) { this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "message", "<Script Language='JavaScript' defer>art.dialog({title: '系统提示',time: 2,content:'您提交的商品数据检验通过,请导入商品信息。',close: function () { }});</script>"); this.bolMainIndex = true; } else { File.Delete(this.strSavePath); } } else { File.Delete(this.strSavePath); base.OutputWarn("商品数据有错误,请改正。"); } } } }
protected void btnRptPointChangeExcel_Click(object sender, EventArgs e) { SysShop bllPointLog = new SysShop(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); DataTable dt = bllPointLog.GetAllianceListShop(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.AllianceListShopReportExcel(dt, this._UserName); }
protected void btnOpinionExcel_Click(object sender, EventArgs e) { string strSql = this.QueryCondition(); int Counts = this.NetPagerParameter.RecordCount; strSql += "and OnlineMessage.MemID=Mem.MemID and Mem.MemShopID=SysShop.ShopID"; DataTable db = this.ProposalBll.GetProposalInfo(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MoneyOpinionExcel(db, this._UserName); }
protected void btnExpenseExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and Mem.MemShopID=SysShop.ShopID and SysRotatePrizeLog.MemID = Mem.MemID and SysRotatePrizeLog.RotateID=SysRotate.RotateID and Mem.MemLevelID=MemLevel.LevelID and SysRotatePrizeLog.PrizeLevel<>'未中奖'"; DataTable dtExpenseHistory = new Chain.BLL.SysRotatePrizeLog().GetListSP(100000, this.NetPagerParameter.CurrentPageIndex, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.SysRotatePrizeLogExcel(dtExpenseHistory, this._UserName); }
protected void btnOut_Click(object sender, EventArgs e) { MicroWebsiteGoods bllGoods = new MicroWebsiteGoods(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and MicroWebsiteGoods.MicroGoodsClassID = MicroWebsiteGoodsClass.MicroGoodsClassID"; DataTable dtGoods = bllGoods.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MicroGoodsListExcel(dtGoods, this._UserName); }
protected void btnOut_Click(object sender, EventArgs e) { string strSql = this.QueryCondition(); GoodsNumber bllGoodsNumber = new GoodsNumber(); int Counts = this.NetPagerParameter.RecordCount; strSql = PubFunction.GetShopAuthority(this._UserShopID, "ShopID", strSql); DataTable db = bllGoodsNumber.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.GoodsStockTotalExcel(db, this._UserName); }
protected void btnMoneyExchangeExcel_Click(object sender, EventArgs e) { string strSql = this.QueryCondition(); int Counts = this.NetPagerParameter.RecordCount; strSql = PubFunction.GetShopAuthority(this._UserShopID, "UserShopID", strSql); MoneyChangeLog moneyChangeLogBll = new MoneyChangeLog(); DataTable db = moneyChangeLogBll.GetMoneyChangeLog(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MoneyChangeLogReportExcel(db, this._UserName); }
protected void btnMemCountExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and Mem.MemID = MemCount.CountMemID and MemCount.CountShopID = SysShop.ShopID and Mem.MemUserID = SysUser.UserID and Mem.MemLevelID=MemLevel.LevelID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "CountShopID", strSql); DataTable dtMemCount = this.bllMemCount.GetListSP(10000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MemCount(dtMemCount, this._UserName); }
protected void btnMemTransferMoneyExcel_Click(object sender, EventArgs e) { MemTransferLog bllMemTransferLog = new MemTransferLog(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and MemTransferLog.UserID = SysUser.UserID"; DataTable db = bllMemTransferLog.GetListSP(1000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MemTransferMoney(db, this._UserName); }
protected void btnExpenseExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and MicroWebsiteOrderLog.MicroOrderShopID = SysShop.ShopID and MicroWebsiteOrderLog.MicroOrderMemID = Mem.MemID and MicroOrderStatus !=2 "; strSql = PubFunction.GetShopAuthority(this._UserShopID, "MicroOrderShopID", strSql); DataTable dtExpenseHistory = new MicroWebsiteOrderLog().GetListSP1(this.NetPagerParameter.PageSize, this.NetPagerParameter.CurrentPageIndex, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MicroExpenseHistory(dtExpenseHistory, this._UserName); }
protected void btnRptPointExchangeExcel_Click(object sender, EventArgs e) { PointExchange bllGiftExchange = new PointExchange(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition() + " and GiftExchange.ExchangeStatus=2 and GiftExchange.MemID=Mem.MemID and GiftExchange.ExchangeUserID = SysUser.UserID and Mem.MemShopID = SysShop.ShopID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "MemShopID", strSql); DataTable dtGiftExchange = bllGiftExchange.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.RptGiftExchangeExcel(dtGiftExchange, this._UserName); }
protected void btnRptExpenseExcel_Click(object sender, EventArgs e) { OrderLog bllOrder = new OrderLog(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and OrderLog.OrderShopID = SysShop.ShopID and OrderLog.OrderMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and OrderLog.OrderUserID = SysUser.UserID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "OrderShopID", strSql); DataTable dtExpense = bllOrder.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.RptExpenseReportExcel(dtExpense, this._UserName); }
protected void BtnMemExcel_Click(object sender, EventArgs e) { Chain.BLL.Mem bllMember = new Chain.BLL.Mem(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and Mem.MemShopID = SysShop.ShopID and Mem.MemLevelID = MemLevel.LevelID and Mem.MemUserID = SysUser.UserID"; strSql += " and Mem.MemShopID =SysShopMemLevel.ShopID and SysShopMemLevel.MemLevelID=MemLevel.LevelID "; DataTable db = bllMember.GetListSP(100000, 1, out Counts, new string[] { PubFunction.GetMemListShopAuthority(this._UserShopID, "MemShopID", strSql) }).Tables[0]; DataExcelInfo.MemReportExcel(db, this._UserName); }
protected void btnExpenseExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and OrderType<>3 "; strSql += " and OrderLog.OrderShopID = SysShop.ShopID and OrderLog.OrderMemID = Mem.MemID and OrderLog.OrderUserID = SysUser.UserID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "OrderShopID", strSql); DataTable dtExpenseHistory = this.bllOrderLog.GetListSP(1000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.ExpenseHistory(dtExpenseHistory, this._UserName); }
protected void btnCouponExcel_Click(object sender, EventArgs e) { Chain.BLL.CouponList bllcoupon = new Chain.BLL.CouponList(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql = strSql + " and CouPonID=" + this.spCouponID.InnerText; DataTable db = bllcoupon.GetListSP(1000000, 1, out Counts, new string[] { strSql }).Tables[0]; int CouponID = int.Parse(this.spCouponID.InnerText); Chain.BLL.Coupon coupon = new Chain.BLL.Coupon(); Chain.Model.Coupon model = coupon.GetModel(CouponID); DataExcelInfo.Coupon(db, this._UserName, model); }
protected void btnMemDrawMoneyExcel_Click(object sender, EventArgs e) { MemDrawMoney bllDrawMoney = new MemDrawMoney(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and MemDrawMoney.DrawMoneyShopID = SysShop.ShopID and MemDrawMoney.DrawMoneyMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and MemDrawMoney.DrawMoneyUserID = SysUser.UserID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "DrawMoneyShopID", strSql); DataTable db = bllDrawMoney.GetListSP(1000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.MemDrawMoney(db, this._UserName); }
protected void btnOut_Click(object sender, EventArgs e) { Chain.BLL.Goods bllGoods = new Chain.BLL.Goods(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += " and Goods.GoodsClassID = GoodsClass.ClassID and Goods.GoodsID = GoodsNumber.GoodsID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "ShopID", strSql); DataTable dtGoods = bllGoods.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.GoodsListExcel(dtGoods, this._UserName); }
protected void btnPointRankExcel_Click(object sender, EventArgs e) { SysUserWork bllsysuserwork = new SysUserWork(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and SysUserWork.userID = SysUser.userid and SysUser.UserShopID = SysShop.ShopID "; strSql = PubFunction.GetShopAuthority(this._UserShopID, "UserShopID", strSql); DataTable dtPoint = bllsysuserwork.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.PointUserWorkExcel(dtPoint, this._UserName); }
protected void btnRptPointChangeExcel_Click(object sender, EventArgs e) { PointLog bllPointLog = new PointLog(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and PointLog.PointShopID = SysShop.ShopID and PointLog.PointMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and PointLog.PointUserID = SysUser.UserID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "PointShopID", strSql); DataTable dtPointLog = bllPointLog.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.PointChangeReportExcel(dtPointLog, this._UserName); }
protected void btnPointRankExcel_Click(object sender, EventArgs e) { Mem bllMem = new Mem(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); strSql += "and Mem.MemShopID = SysShop.ShopID and Mem.MemLevelID = MemLevel.LevelID and MemPoint>0 "; strSql = PubFunction.GetShopAuthority(this._UserShopID, "MemShopID", strSql); DataTable dtPoint = bllMem.GetPointRankList(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.PointRankReportExcel(dtPoint, this._UserName); }
protected void btnRptExpenseExcel_Click(object sender, EventArgs e) { Chain.BLL.GoodsLog bllGoodsLog = new Chain.BLL.GoodsLog(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); string strAgent = ""; strSql += " and GoodsLog.ShopID>0"; strSql += " and GoodsLog.ShopID = SysShop.ShopID and GoodsLog.UserID = SysUser.UserID"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "GoodsLog.ShopID", strSql); DataTable db = bllGoodsLog.GetListSP(100000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.GoodsLogExcel(db, this._UserName, strAgent); }
protected void btnGoodsExpenseExcel_Click(object sender, EventArgs e) { int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); string strWhere = " and " + this.QueryCondition(); string strStartTime = this.txtStartTime.Value; string strEntTime = this.txtEndTime.Value; if (strStartTime != "") { strSql = strSql + " and OrderCreateTime>='" + strStartTime + "'"; strWhere = strWhere + " and OrderCreateTime>='" + strEntTime + "'"; } if (strEntTime != "") { DateTime strEntTimes = Convert.ToDateTime(strEntTime).AddDays(1.0); object obj = strSql; strSql = string.Concat(new object[] { obj, " and OrderCreateTime<'", strEntTimes, "'" }); obj = strWhere; strWhere = string.Concat(new object[] { obj, " and OrderCreateTime<'", strEntTimes, "'" }); } strSql += " and OrderLog.OrderType != 4 AND OrderLog.OrderType != 5 AND OrderLog.OrderType != 3"; strSql = PubFunction.GetShopAuthority(this._UserShopID, "OrderLog.OrderShopID", strSql); Chain.BLL.Goods bllGoods = new Chain.BLL.Goods(); DataTable dt = bllGoods.GetGoodsExpense(10000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.GoodsExpensExcel(dt, this._UserName, strWhere); }
protected void btnWeiXinGiveMoneyExcel_Click(object sender, EventArgs e) { string strSql = " Mem.MemID=WeiXinGiveMoney.MemID and Mem.MemShopID=SysShop.ShopID"; if (base.Request.QueryString["MoneyID"] != null) { strSql = strSql + " and IsWin=1 and MoneyID=" + int.Parse(base.Request.QueryString["MoneyID"]); } if (base.Request.QueryString["MemID"] != null) { strSql = strSql + " and IsWin=1 and WeiXinGiveMoney.MemID=" + int.Parse(base.Request.QueryString["MemID"]); } int Counts = this.NetPagerParameter.RecordCount; DataTable db = this.bllMoney.GetListSP(1000000, 1, out Counts, new string[] { strSql }).Tables[0]; DataExcelInfo.WeiXinGiveMoneyExport(db, this._UserName); }
protected void btnRptPointChangeExcel_Click(object sender, EventArgs e) { StringBuilder strWhere = new StringBuilder(); if (this.txtStartTime.Value != "") { strWhere.AppendFormat(" and ShopCreateTime>='{0}' ", this.txtStartTime.Value); } if (this.txtEndTime.Value != "") { strWhere.AppendFormat(" and ShopCreateTime<='{0}'", PubFunction.TimeEndDay(this.txtEndTime.Value)); } SysShop bllPointLog = new SysShop(); int Counts = this.NetPagerParameter.RecordCount; string strSql = this.QueryCondition(); DataTable dt = bllPointLog.GetListShop(100000, 1, out Counts, strWhere.ToString(), new string[] { strSql }).Tables[0]; DataExcelInfo.ShopListShopReportExcel(dt, this._UserName); }
protected void btnShopExcel_Click(object sender, EventArgs e) { DataTable dt = this.Get_ParameterList(this.QueryCondition()); DataExcelInfo.ShopReportExcel(dt, this._UserName); }
protected void btnGoodsTemplate_Click(object sender, EventArgs e) { DataExcelInfo.GoodsTemplateExcel(this._UserShopID); }