protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPShouKuan model = new ZWL.BLL.ERPShouKuan(); model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblProjectName.Text = model.ProjectName; this.lblProjectSerils.Text = model.ProjectSerils; this.lblJieDuanName.Text = model.JieDuanName; this.lblShouKuanE.Text = model.ShouKuanE; this.lblFaPiaoHao.Text = model.FaPiaoHao; this.lblShouKuanDate.Text = model.ShouKuanDate; this.lblDaoKuanDate.Text = model.DaoKuanDate; this.lblShengYuE.Text = model.ShengYuE; this.lblUserName.Text = model.UserName; this.lblTimeStr.Text = model.TimeStr.ToString(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "查看收款信息(" + this.lblProjectName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
public void DataBindToGridview() { ZWL.BLL.ERPShouKuan MyModel = new ZWL.BLL.ERPShouKuan(); GVData.DataSource = MyModel.GetList("ProjectName 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.ERPShouKuan model = new ZWL.BLL.ERPShouKuan(); model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtProjectName.Text = model.ProjectName; this.txtProjectSerils.Text = model.ProjectSerils; this.txtJieDuanName.Text = model.JieDuanName; this.txtShouKuanE.Text = model.ShouKuanE; this.txtFaPiaoHao.Text = model.FaPiaoHao; this.txtShouKuanDate.Text = model.ShouKuanDate; this.txtDaoKuanDate.Text = model.DaoKuanDate; this.txtShengYuE.Text = model.ShengYuE; } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPShouKuan model = new ZWL.BLL.ERPShouKuan(); model.ProjectName = this.txtProjectName.Text; model.ProjectSerils = this.txtProjectSerils.Text; model.JieDuanName = this.txtJieDuanName.Text; model.ShouKuanE = this.txtShouKuanE.Text; model.FaPiaoHao = this.txtFaPiaoHao.Text; model.ShouKuanDate = this.txtShouKuanDate.Text; model.DaoKuanDate = this.txtDaoKuanDate.Text; model.ShengYuE = this.txtShengYuE.Text; model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); model.TimeStr = DateTime.Now; model.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加收款信息(" + this.txtProjectName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "收款信息添加成功!", "ShouKuan.aspx?ProjectName=" + Request.QueryString["ProjectName"].ToString()); }