public void DataBindToGridview() { ZWL.BLL.ERPPinShen MyModel = new ZWL.BLL.ERPPinShen(); 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.ERPPinShen model = new ZWL.BLL.ERPPinShen(); model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtProjectName.Text = model.ProjectName; this.txtProjectSerils.Text = model.ProjectSerils; this.txtPingShenTime.Text = model.PingShenTime; this.txtPingShenJieGuo.Text = model.PingShenJieGuo; this.txtBachInfo.Text = model.BachInfo; } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPPinShen model = new ZWL.BLL.ERPPinShen(); model.ProjectName = this.txtProjectName.Text; model.ProjectSerils = this.txtProjectSerils.Text; model.PingShenTime = this.txtPingShenTime.Text; model.PingShenJieGuo = this.txtPingShenJieGuo.Text; model.BachInfo = this.txtBachInfo.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, "评审信息添加成功!", "PingShen.aspx?ProjectName=" + Request.QueryString["ProjectName"].ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPPinShen model = new ZWL.BLL.ERPPinShen(); model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblProjectName.Text = model.ProjectName; this.lblProjectSerils.Text = model.ProjectSerils; this.lblPingShenTime.Text = model.PingShenTime; this.lblPingShenJieGuo.Text = model.PingShenJieGuo; this.lblUserName.Text = model.UserName; this.lblTimeStr.Text = model.TimeStr.ToString(); this.lblBachInfo.Text = model.BachInfo; //写系统日志 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(); } }