protected void btn_Sub_Click(object sender, EventArgs e) { ZWL.BLL.ERPHuiBao Model = new ZWL.BLL.ERPHuiBao(); Model.TitleStr = this.TextBox1.Text; Model.ContentStr = this.TxtContent.Text; Model.CanLookUser = this.UserName_Input.Value; Model.DDWL = this.TextBox3.Text; Model.TimeStr = DateTime.Now; Model.DDWL = this.ddl_WarningType.SelectedValue; Model.FuJianStr = ZWL.Common.PublicMethod.GetSessionValue("WenJianList"); Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); Model.SSBM = ZWL.Common.PublicMethod.GetSessionValue("Department"); if(string.IsNullOrEmpty(this.TextBox2.Text)) { Model.ZT = "信息保存"; } else { Model.ZT = "信息转发"; } Model.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加工作报告信息(" + this.TextBox1.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); Response.Write("<script>alert('工作报告添加成功!');window.location.href='"+ReturnInput.Value+"'</script>"); }
protected void ImageButton1_Click(object sender, EventArgs e) { ZWL.BLL.ERPHuiBao Model = new ZWL.BLL.ERPHuiBao(); Model.TitleStr = this.TextBox1.Text; Model.ContentStr = this.TxtContent.Value; Model.CanLookUser = this.TextBox2.Text; Model.TimeStr = DateTime.Now; Model.FuJianStr = ZWL.Common.PublicMethod.GetSessionValue("WenJianList"); Model.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); Model.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加工作汇报信息(" + this.TextBox1.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "工作汇报添加成功!", "HuiBao.aspx"); }