public static decimal GetStockNumberByCode(string code) { string contrastTreasuryCode = new cn.justwin.stockBLL.Treasury().GetContrastTreasuryCode(); TreasuryStock stock = new TreasuryStock(); if (!string.IsNullOrEmpty(contrastTreasuryCode)) { return(stock.GetNumber(code, contrastTreasuryCode)); } return(stock.GetNumber(code)); }
protected void Page_Load(object sender, EventArgs e) { base.Response.Clear(); base.Response.Cache.SetNoStore(); if (!this.Page.IsPostBack) { if (base.Request.QueryString["op"] == null && base.Request.QueryString["ac"] == null) { base.RegisterScript("top.ui.alert('页面错误,请联系技术人员')"); return; } if (base.Request.QueryString["op"] != "") { this.HdnOperater.Value = base.Request.QueryString["op"]; if (base.Request.QueryString["op"] == "Add") { this.lblAllocationNo.Text = DateTime.Now.ToString("yyyyMMddhhmmss"); this.hdGuid.Value = Guid.NewGuid().ToString(); this.HdnSelectOutPer.Value = base.UserCode; AllocationBllAction allocationBllAction = new AllocationBllAction(); this.txtOutAllocationPerson.Text = allocationBllAction.GetUserNameByCode(base.UserCode); } cn.justwin.stockBLL.Treasury treasury = new cn.justwin.stockBLL.Treasury(); if (treasury.GetManageMode() == SmEnum.SmSetValue.ParallelMode) { this.HdnStockModel.Value = "0"; } if (Convert.ToInt32(treasury.GetManageMode()) == 1) { this.HdnStockModel.Value = "1"; } } this.BindGVMaterialList(); this.btnSave.Attributes["onclick"] = "return checkData();"; this.txtOutDepository.Attributes["readonly"] = "readonly"; this.txtInDepository.Attributes["readonly"] = "readonly"; this.txtOutAllocationPerson.Attributes["readonly"] = "readonly"; this.txtInAllocationPerson.Attributes["readonly"] = "readonly"; this.lblAllocationNo.Attributes["readonly"] = "readonly"; this.FileLink1.MID = 89; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; } }