protected void GetValue(string ProductID, string BatchNo, string DeptID, string DailyDate, string CompanyCD) { DataTable dt = SubDayEndBus.GetSubStorageDailyInfo(ProductID, BatchNo, DeptID, DailyDate, CompanyCD); if (dt.Rows.Count > 0) { txtBatchNo.Text = dt.Rows[0]["BatchNo"].ToString(); txtCreateDate.Text = dt.Rows[0]["CreateDate"].ToString(); this.txtCreator.Text = dt.Rows[0]["CreatorName"].ToString(); this.txtDailyDate.Text = dt.Rows[0]["DailyDate"].ToString(); this.txtDeptID.Text = dt.Rows[0]["DeptName"].ToString(); this.txtDispInCont.Text = dt.Rows[0]["DispInCont"].ToString(); this.txtDispOutCount.Text = dt.Rows[0]["DispOutCount"].ToString(); this.txtInitInCount.Text = dt.Rows[0]["InitInCount"].ToString(); this.txtInTotal.Text = dt.Rows[0]["InTotal"].ToString(); this.txtOutTotal.Text = dt.Rows[0]["OutTotal"].ToString(); this.txtProductID.Text = dt.Rows[0]["ProductName"].ToString(); this.txtSaleBackFee.Text = dt.Rows[0]["SaleBackFee"].ToString(); this.txtSaleBackInCount.Text = dt.Rows[0]["SaleBackInCount"].ToString(); this.txtSaleFee.Text = dt.Rows[0]["SaleFee"].ToString(); this.txtSaleOutCount.Text = dt.Rows[0]["SaleOutCount"].ToString(); this.txtSendInCount.Text = dt.Rows[0]["SendInCount"].ToString(); this.txtSendOutCount.Text = dt.Rows[0]["SendOutCount"].ToString(); this.txtSubSaleBackInCount.Text = dt.Rows[0]["SubSaleBackInCount"].ToString(); this.txtSubSaleOutCount.Text = dt.Rows[0]["SubSaleOutCount"].ToString(); this.txtTodayCount.Text = dt.Rows[0]["TodayCount"].ToString(); this.txtProductNo.Text = dt.Rows[0]["ProductNo"].ToString(); this.txtDAORU.Text = dt.Rows[0]["InitBatchCount"].ToString(); } }
protected void btnImport_Click(object sender, ImageClickEventArgs e) { string orderString = hidOrderby.Value.Trim(); //排序 string order = "DESC"; //排序:升序 string orderBy = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "CreateDate"; //要排序的字段,如果为空,默认为"ID" if (orderString.EndsWith("_a")) { order = "ASC";//排序:降序 } if (string.IsNullOrEmpty(hidPageCount.Value.Trim())) { } else { int pageCount = int.Parse(hidPageCount.Value.Trim()); //每页显示记录数 int pageIndex = int.Parse(hidPageIndex.Value.Trim()); //当前页 int skipRecord = (pageIndex - 1) * pageCount; //跳过记录数 string day = txtStartPlanDate.Value.Trim(); int TotalCount = 0; UserInfoUtil user = ((UserInfoUtil)SessionUtil.Session["UserInfo"]); string _deptID = ""; DataRow dtSong = SubStorageDBHelper.GetSubDeptFromDeptID(user.DeptID.ToString()); if (dtSong != null) { _deptID = dtSong["ID"].ToString(); } orderBy = orderBy + " " + order; DataTable dt = SubDayEndBus.SelectDayInfo(pageIndex, pageCount, orderBy, ref TotalCount, day, _deptID); //导出标题 string headerTitle = "日期|物品编号|品名|规格|批次|门店|入库总数量|出库总数量|当日结存量"; string[] header = headerTitle.Split('|'); //导出标题所对应的列字段名称 string columnFiled = "DailyDate|ProductNo|ProductName|Specification|BatchNo|DeptName|InTotal|OutTotal|TodayCount"; string[] field = columnFiled.Split('|'); XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "库存日结列表"); } }
protected void LoadPrintInfo() { PrintParameterSettingModel model = new PrintParameterSettingModel(); model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.BillTypeFlag = int.Parse(ConstUtil.BILL_TYPEFLAG_STORAGE); model.PrintTypeFlag = ConstUtil.PRINTBILL_TYPEFLAG_SubDayEnd; /*此处需注意在模板设置表里的字段和取基本信息的字段是否一致*/ string[,] aBase = { { "日结日期", "DailyDate" }, { "分店", "DeptName" }, { "品名", "ProductName" }, { "批次", "BatchNo" }, { "物品编号", "ProductNo" }, { "入库总数量 ", "InTotal" }, { "出库总数量", "OutTotal" }, { "当日结存量", "TodayCount" }, { "当日销售金额", "SaleFee" }, { "当日销售退货金额", "SaleBackFee" }, { "配送退货出库数量", "SendOutCount" }, { "期初库存录入数量", "InitInCount" }, { "配送入库数量", "SendInCount" }, { "门店调拨入库数量", "DispInCont" }, { "门店调拨出库数量", "DispOutCount" }, { "销售出库数量(总店发货模式)", "SaleOutCount" }, { "销售退货入库数量(总店发货模式)", "SaleBackInCount" }, { "销售退货入库数量(分店发货模式)", "SubSaleBackInCount" }, { "销售出库数量(分店发货模式)", "SubSaleOutCount" }, { "操作人", "CreatorName" }, { "操作日期", "CreateDate" }, }; DataTable dbPrint = XBase.Business.Common.PrintParameterSettingBus.GetPrintParameterSettingInfo(model); DataTable dtMRP = SubDayEndBus.GetSubStorageDailyInfo(Convert.ToString(this.intMrpID), this.BatchNo, Convert.ToString(this.DeptID), this.DailyDate, model.CompanyCD); string strBaseFields = ""; /*第二明细*/ if (dbPrint.Rows.Count > 0) { isSeted.Value = "1"; strBaseFields = dbPrint.Rows[0]["BaseFields"].ToString(); } else { isSeted.Value = "0"; strBaseFields = "DailyDate|DeptName|ProductName|BatchNo|ProductNo|InTotal|OutTotal|TodayCount|SaleFee|SaleBackFee|SendOutCount|InitInCount|SendInCount|DispInCont|DispOutCount|SaleOutCount|SaleBackInCount|SubSaleBackInCount|SubSaleOutCount|CreatorName|CreateDate"; } if (!string.IsNullOrEmpty(strBaseFields)) { tableBase.InnerHtml = WritePrintPageTable("门店日结明细", strBaseFields, null, aBase, null, dtMRP, null, true); } }