private void saveOrder() { DateTime dt = DateTime.Now.ToUniversalTime(); InventoryDocBLL invent = new InventoryDocBLL(); string availableOrderID = invent.GetNewOrderID(EnumOrderFormType.OneToAnother); // CommonDataBLL common = new CommonDataBLL(); string makeman = txtOperator.Text.Trim().Replace("'", "") == "" ? CommonDataBLL.GetNameByAdminID(Session["Company"].ToString()) : txtOperator.Text.Trim().Replace("'", ""); // QueryInStorageBLL qinstore = new QueryInStorageBLL(); int docTpyeId = Convert.ToInt32(QueryInStorageBLL.GetDocTypeIDEByDocTypeCode("DB"));//调拨单 //CountryBLL bl = new CountryBLL(); UserControl_Country countrys = Page.FindControl("Country1") as UserControl_Country; InventoryDocModel tobjopda_depotManageDoc = new InventoryDocModel (CommonDataBLL.GetNameByAdminID(Session["Company"].ToString()), CommonDataBLL.OperateIP, DateTime.UtcNow, CommonDataBLL.OperateBh, docTpyeId, availableOrderID, dt, makeman, 0, Session["Company"].ToString(), Convert.ToInt32(ddlinwareHouse.SelectedValue.Trim()), Convert.ToInt32(ddlintDepotSeatID.SelectedValue.Trim()), Convert.ToDouble(ViewState["zongPrice"]), Convert.ToDouble(ViewState["zongPv"]), "", (int)Application["maxqishu"], "DB", txtReamrk.Text, 1, DAL.CurrencyDAL.GetMoreCurrencyIDByCountryCode(DropCurrery.SelectedItem.Value)); tobjopda_depotManageDoc.OriginalDocID = txtoldDocID.Text.Trim().Replace("'", ""); //StorageInBLL.CreateNewBillofDocument(tobjopda_depotManageDoc); //AddReportDamageBLL.addReportDemage(CommonDataBLL.GetNameByAdminID(Session["Company"].ToString()), CommonDataBLL.OperateIP, CommonDataBLL.OperateBh, availableOrderID); //int exist; //string InsertStr = ""; //string result = ""; //foreach (InventoryDocDetailsModel opda_docDetail in (ArrayList)ViewState["list"]) //{ // opda_docDetail.DocID = availableOrderID; // string rt = InventoryDocBLL.SetDiaoBo(Convert.ToInt32(ddloutWareHouse.SelectedValue.Trim()), Convert.ToInt32(ddloutDepotSeatID.SelectedValue), Convert.ToInt32(ddlinwareHouse.SelectedValue.Trim()), Convert.ToInt32(ddlintDepotSeatID.SelectedValue), opda_docDetail.ProductQuantity, opda_docDetail.ProductID, opda_docDetail); // if (rt != "1") // result = result + "产品名称 " + ProductModeBLL.GetProductNameByID(opda_docDetail.ProductID) + " 调拨失败;"; // else // result = result + "产品名称 " + ProductModeBLL.GetProductNameByID(opda_docDetail.ProductID) + " 调拨成功;"; //} //int cID = Convert.ToInt32(DropCurrery.SelectedItem.Value); //gridBind(cID, Convert.ToInt32(ddloutWareHouse.SelectedValue), Convert.ToInt32(ddloutDepotSeatID.SelectedValue)); //ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + result + "');</script>"); //(inventoryDocDetailsModels, outWareHouse, outDepotSeatID, inWareHouse, inDepotSeatID, tobjopda_depotManageDoc); string rt = InventoryDocBLL.SetDiaoBo((ArrayList)ViewState["list"], Convert.ToInt32(ddlinwareHouse.SelectedValue.Trim()), Convert.ToInt32(ddlintDepotSeatID.SelectedValue), Convert.ToInt32(ddloutWareHouse.SelectedValue.Trim()), Convert.ToInt32(ddloutDepotSeatID.SelectedValue), tobjopda_depotManageDoc); if (rt == "1") { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("002001", "调拨成功") + "');</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("002002", "调拨失败") + "');</script>"); } int cID = Convert.ToInt32(DropCurrery.SelectedItem.Value); gridBind(cID, Convert.ToInt32(ddloutWareHouse.SelectedValue), Convert.ToInt32(ddloutDepotSeatID.SelectedValue)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pageshow(); DataTable print = InventoryDocBLL.PrintMemberOrderDocDetails(DocID); if (print != null) { lblbilltypename.Text = "发货单"; lblAddress.Text = print.Rows[0]["Country"].ToString() + print.Rows[0]["Province"].ToString() + print.Rows[0]["City"].ToString() + Encryption.Encryption.GetDecipherAddress(print.Rows[0]["ConAddress"].ToString()); lblBillID.Text = DocID; lblDocType.Text = Common.GetMemberOrderType(print.Rows[0]["OrderType"].ToString()); lblCurrency.Text = print.Rows[0]["name"].ToString(); lblDocAuditer.Text = HttpContext.Current.Session["Store"].ToString(); lblDocAuditTime.Text = Convert.ToDateTime(print.Rows[0]["OrderDate"]).ToShortDateString(); lblDocMaker.Text = HttpContext.Current.Session["Store"].ToString(); lblDocMakeTime.Text = DateTime.Now.ToShortDateString(); lblNote.Text = print.Rows[0]["Remark"].ToString(); lblOperateNum.Text = HttpContext.Current.Session["Store"].ToString(); lblprintDate.Text = DateTime.Now.ToShortDateString(); lblStoreID.Text = HttpContext.Current.Session["Store"].ToString(); lblTotalMoney.Text = Convert.ToDouble(print.Rows[0]["TotalMoney"]).ToString("0.00"); lbltotalpv.Text = Convert.ToDouble(print.Rows[0]["totalpv"]).ToString("0.00"); this.givShow.DataSource = InventoryDocBLL.DisplayMemberOrderDocDetails(DocID); this.givShow.DataBind(); } } Translations(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pageshow(); PrintInventoryDoc print = InventoryDocBLL.PrintInventoryDocDetails(DocID); if (print != null) { lblAddress.Text = Encryption.Encryption.GetDecipherAddress(print.Address); //lblAddress.Text = print.Address; lblBatchCode.Text = print.BatchCode; lblBillID.Text = print.DocID; //lblbilltypename.Text = print.DocTypeNames; lblCloseFlag.Text = print.CloseFlag == 1 ? tran.GetTran("000233", "是") : tran.GetTran("000235", "否"); lblbilltypename.Text = print.DocTypeNames; if (TypeName != "") { lblbilltypename.Text = TypeName; } lblCurrency.Text = print.CurrencyName; lblDocAuditer.Text = print.DocAuditer; if (print.DocAuditTime == DateTime.MinValue) { lblDocAuditTime.Text = ""; } else { lblDocAuditTime.Text = print.DocAuditTime.ToShortDateString(); } lblDocMaker.Text = print.DocMaker; if (print.DocMakeTime == DateTime.MinValue) { lblDocMakeTime.Text = ""; } else { lblDocMakeTime.Text = print.DocMakeTime.ToShortDateString(); } if (print.DocSecondAuditTime == DateTime.MinValue) { lblDocSecondAuditTime.Text = ""; } else { lblDocSecondAuditTime.Text = print.DocSecondAuditTime.ToShortDateString(); } if (TypeName != "") { lblDocType.Text = TypeName; } else { lblDocType.Text = print.DocTypeNames; } this.lblIsRubric.Text = print.IsRubric == 1 ? tran.GetTran("000233", "是") : tran.GetTran("000235", "否"); lblNote.Text = print.Note; lblOperateNum.Text = CommonDataBLL.OperateBh; lblprintDate.Text = DateTime.Now.ToShortDateString(); lblProvider.Text = print.ProviderName == "0" ? tran.GetTran("000221", "无") : print.ProviderName; lblStateFlag.Text = print.StateFlag == 1 ? tran.GetTran("001072", "有效") : tran.GetTran("001069", "无效"); if (print.CloseDate == DateTime.MinValue) { lblStateFlagtime.Text = ""; } else { //lblStateFlagtime.Text = print.CloseDate.ToShortDateString(); } lblStoreID.Text = print.StoreID; lblTotalMoney.Text = print.TotalMoney.ToString(); lbltotalpv.Text = print.Totalpv.ToString(); lblWareHouse.Text = print.WareHouseName; lblCloseFlag.Text = print.CloseFlag == 1 ? tran.GetTran("000019", "关闭") : tran.GetTran("004105", "未关闭"); lblSeatName.Text = print.SeatName; this.givShow.DataSource = InventoryDocBLL.DisplayInventoryDocDetails(DocID); this.givShow.DataBind(); } } Translations(); }