protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPContractChanPin Model = new ZWL.BLL.ERPContractChanPin(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblHeTongName.Text = Model.HeTongName.ToString(); this.lblChanPinName.Text = Model.ChanPinName.ToString(); this.lblDanJia.Text = Model.DanJia.ToString(); this.lblShuLiang.Text = Model.ShuLiang.ToString(); this.lblZongJia.Text = Model.ZongJia.ToString(); this.lblYiFuKuan.Text = Model.YiFuKuan.ToString(); this.lblQianKuanShu.Text = Model.QianKuanShu.ToString(); this.lblIFJiaoFu.Text = Model.IFJiaoFu.ToString(); this.lblUserName.Text = Model.UserName.ToString(); this.lblTimeStr.Text = Model.TimeStr.ToString(); this.lblBackInfo.Text = Model.BackInfo.ToString(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看订单产品信息(" + this.lblHeTongName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
public void DataBindToGridview() { ZWL.BLL.ERPContractChanPin MyModel = new ZWL.BLL.ERPContractChanPin(); string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'"); string SSTempSTR = ""; if (XiaShuUser != "全部") { SSTempSTR = "and UserName in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")"; } string sql = ""; if (!string.IsNullOrEmpty(this.TextBox1.Text)) { sql += "(HeTongName Like '%" + this.TextBox1.Text + "%' or ChanPinName Like '%" + this.TextBox1.Text + "%' or DanJia Like '%" + this.TextBox1.Text + "%' or ShuLiang Like '%" + this.TextBox1.Text + "%' or UserName Like '%" + this.TextBox1.Text + "%' or IFJiaoFu Like '%" + this.TextBox1.Text + "%')"; } if (!string.IsNullOrEmpty(this.TextBox3.Text)) { if (string.IsNullOrEmpty(sql)) { sql += " TimeStr >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TimeStr<='" + this.TextBox4.Text.Trim() + " 23:59:59' "; } else { sql += "and TimeStr >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TimeStr<='" + this.TextBox4.Text.Trim() + " 23:59:59' "; } sql += " " + SSTempSTR + " order by ID desc"; } GVData.DataSource = MyModel.GetList(sql); GVData.DataBind(); LabPageSum.Text = Convert.ToString(GVData.PageCount); LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1)); this.GoPage.Text = LabCurrentPage.Text.ToString(); }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPContractChanPin Model = new ZWL.BLL.ERPContractChanPin(); Model.HeTongName = this.txtHeTongName.Text.ToString(); Model.ChanPinName = this.txtChanPinName.Text.ToString(); Model.DanJia = decimal.Parse(this.txtDanJia.Text); Model.ShuLiang = decimal.Parse(this.txtShuLiang.Text); Model.ZongJia = decimal.Parse(this.txtZongJia.Text); Model.YiFuKuan = decimal.Parse(this.txtYiFuKuan.Text); Model.QianKuanShu = decimal.Parse(this.txtQianKuanShu.Text); Model.IFJiaoFu = this.RadioButtonList1.SelectedItem.Text; Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); Model.TimeStr = DateTime.Now; Model.BackInfo = this.txtBackInfo.Text.ToString(); if (this.RadioButtonList1.SelectedItem.Text == "已交付") { //从产品库存中减去 string TempSqlStr = "update ERPProduct set ChuKuSum=ChuKuSum+" + this.txtShuLiang.Text + ",NowKuCun=NowKuCun-" + this.txtShuLiang.Text + " where ProductName='" + this.txtChanPinName.Text.ToString() + "'"; ZWL.DBUtility.DbHelperSQL.ExecuteSQL(TempSqlStr); } Model.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加合同产品信息(" + this.txtHeTongName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "合同产品信息添加成功!", "SellLog.aspx?HeTongName=" + Request.QueryString["HeTongName"].ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); this.txtHeTongName.Attributes.Add("readonly", "true"); this.txtChanPinName.Attributes.Add("readonly", "true"); ZWL.BLL.ERPContractChanPin Model = new ZWL.BLL.ERPContractChanPin(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtHeTongName.Text = Model.HeTongName.ToString(); this.txtChanPinName.Text = Model.ChanPinName.ToString(); this.txtDanJia.Text = Model.DanJia.ToString(); this.txtShuLiang.Text = Model.ShuLiang.ToString(); this.Label1.Text = Model.ShuLiang.ToString(); this.txtZongJia.Text = Model.ZongJia.ToString(); this.txtYiFuKuan.Text = Model.YiFuKuan.ToString(); this.txtQianKuanShu.Text = Model.QianKuanShu.ToString(); this.RadioButtonList1.SelectedValue = Model.IFJiaoFu.ToString(); this.Label2.Text = Model.UserName.ToString(); this.Label3.Text = Model.TimeStr.ToString(); this.txtBackInfo.Text = Model.BackInfo.ToString(); this.Label4.Text = Model.IFJiaoFu.ToString(); RefreshData(); } }
public void DataBindToGridview() { ZWL.BLL.ERPContractChanPin MyModel = new ZWL.BLL.ERPContractChanPin(); GVData.DataSource = MyModel.GetList("HeTongName Like '%" + this.TextBox1.Text + "%' order by ID desc"); GVData.DataBind(); LabPageSum.Text = Convert.ToString(GVData.PageCount); LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1)); this.GoPage.Text = LabCurrentPage.Text.ToString(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPContractChanPin Model = new ZWL.BLL.ERPContractChanPin(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblHeTongName.Text = Model.HeTongName.ToString(); this.lblChanPinName.Text = Model.ChanPinName.ToString(); this.lblDanJia.Text = Model.DanJia.ToString(); this.lblShuLiang.Text = Model.ShuLiang.ToString(); this.lblZongJia.Text = Model.ZongJia.ToString(); this.lblYiFuKuan.Text = Model.YiFuKuan.ToString(); this.lblQianKuanShu.Text = Model.QianKuanShu.ToString(); this.lblIFJiaoFu.Text = Model.IFJiaoFu.ToString(); this.lblUserName.Text = Model.UserName.ToString(); this.lblTimeStr.Text = Model.TimeStr.ToString(); this.lblBackInfo.Text = Model.BackInfo.ToString(); ZWL.BLL.ERPProduct ModelProduct = new ZWL.BLL.ERPProduct(); ModelProduct.GetModelByName(Model.ChanPinName.ToString()); this.lblProductSize.Text = ModelProduct.ProductSize; this.lblPerformance.Text = ModelProduct.Performance; this.lblCoating.Text = ModelProduct.Coating; this.lblSurfaceTreatment.Text = ModelProduct.SurfaceTreatment; this.lblMagnetizingDirection.Text = ModelProduct.MagnetizingDirection; this.lblTolerance.Text = ModelProduct.Tolerance; this.lblIsContainingTax.Text = ModelProduct.IsContainingTax == 1 ? "是" : "否"; //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看订单产品信息(" + this.lblHeTongName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }