public void DataBindToGridview() { DataEntityDataContext context = new DataEntityDataContext(); ZWL.BLL.ERPPeiXun MyLanEmail = new ZWL.BLL.ERPPeiXun(); var T = context.ERPPeiXun.Where(p => p.ID > 0).OrderByDescending(p => p.ID); EmailList = T.ToList(); }
protected void ImageButton1_Click(object sender, EventArgs e) { ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.PeiXunName = this.txtPeiXunName.Text.ToString(); Model.PeiXunUser = this.txtPeiXunUser.Text.ToString(); Model.CanYuUser = this.txtCanYuUser.Text.ToString(); Model.StartDate = this.txtStartDate.Text.ToString(); Model.EndDate = this.txtEndDate.Text.ToString(); Model.PeiXunMuDi = this.txtPeiXunMuDi.Text.ToString(); Model.PeiXunNeiRong = this.txtPeiXunNeiRong.Text.ToString(); Model.XiaoGuo = this.txtXiaoGuo.Text.ToString(); Model.BackInfo = this.txtBackInfo.Text.ToString(); Model.FuJianList = ZWL.Common.PublicMethod.GetSessionValue("WenJianList"); 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.txtPeiXunName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "培训信息添加成功!", "PeiXun.aspx"); }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.ID = int.Parse(Request.QueryString["ID"].ToString()); Model.PeiXunName=this.txtPeiXunName.Text.ToString(); Model.PeiXunUser=this.txtPeiXunUser.Text.ToString(); Model.CanYuUser=this.txtCanYuUser.Text.ToString(); Model.StartDate=this.txtStartDate.Text.ToString(); Model.EndDate=this.txtEndDate.Text.ToString(); Model.PeiXunMuDi=this.txtPeiXunMuDi.Text.ToString(); Model.PeiXunNeiRong=this.txtPeiXunNeiRong.Text.ToString(); Model.XiaoGuo=this.txtXiaoGuo.Text.ToString(); Model.BackInfo=this.txtBackInfo.Text.ToString(); Model.FuJianList=ZWL.Common.PublicMethod.GetSessionValue("WenJianList"); Model.UserName=this.txtUserName.Text.ToString(); Model.TimeStr=DateTime.Parse(this.txtTimeStr.Text); Model.Update(); //дϵͳ��־ ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "�û�����ѵ��Ϣ(" + this.txtPeiXunName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "��ѵ��Ϣ�ijɹ���", "PeiXun.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblPeiXunName.Text = Model.PeiXunName.ToString(); PeiXunName = Model.PeiXunName.ToString(); this.lblPeiXunUser.Text = Model.PeiXunUser.ToString(); this.lblCanYuUser.Text = Model.CanYuUser.ToString(); this.lblStartDate.Text = Model.StartDate.ToString(); this.lblEndDate.Text = Model.EndDate.ToString(); this.lblPeiXunMuDi.Text = Model.PeiXunMuDi.ToString(); this.lblPeiXunNeiRong.Text = Model.PeiXunNeiRong.ToString(); this.lblXiaoGuo.Text = Model.XiaoGuo.ToString(); this.lblBackInfo.Text = Model.BackInfo.ToString(); this.lblFuJianList.Text = ZWL.Common.PublicMethod.GetWenJian(Model.FuJianList.ToString(), "../UploadFile/"); this.lblUserName.Text = Model.UserName.ToString(); this.lblTimeStr.Text = Model.TimeStr.ToString(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看培训信息(" + this.lblPeiXunName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblPeiXunName.Text=Model.PeiXunName.ToString(); PeiXunName = Model.PeiXunName.ToString(); this.lblPeiXunUser.Text=Model.PeiXunUser.ToString(); this.lblCanYuUser.Text=Model.CanYuUser.ToString(); this.lblStartDate.Text=Model.StartDate.ToString(); this.lblEndDate.Text=Model.EndDate.ToString(); this.lblPeiXunMuDi.Text=Model.PeiXunMuDi.ToString(); this.lblPeiXunNeiRong.Text=Model.PeiXunNeiRong.ToString(); this.lblXiaoGuo.Text=Model.XiaoGuo.ToString(); this.lblBackInfo.Text=Model.BackInfo.ToString(); this.lblFuJianList.Text=ZWL.Common.PublicMethod.GetWenJian(Model.FuJianList.ToString(),"../UploadFile/"); this.lblUserName.Text=Model.UserName.ToString(); this.lblTimeStr.Text=Model.TimeStr.ToString(); //дϵͳ��־ ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "�û��鿴��ѵ��Ϣ(" + this.lblPeiXunName.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
public void DataBindToGridview() { DataEntityDataContext context = new DataEntityDataContext(); ZWL.BLL.ERPPeiXun MyLanEmail = new ZWL.BLL.ERPPeiXun(); var T = context.ERPPeiXun.Where(p => p.ID > 0).OrderByDescending(p => p.ID); EmailList = T.ToList(); }
public void DataBindToGridview() { ZWL.BLL.ERPPeiXun MyModel = new ZWL.BLL.ERPPeiXun(); GVData.DataSource = MyModel.GetList("PeiXunName 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(); }
public void DataBindToGridview() { ZWL.BLL.ERPPeiXun MyModel = new ZWL.BLL.ERPPeiXun(); GVData.DataSource = MyModel.GetList("PeiXunName 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(); }
public void DataBindToGridview() { GVData.PageSize = AspNetPager1.PageSize; GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1; ZWL.BLL.ERPPeiXun MyModel = new ZWL.BLL.ERPPeiXun(); DataSet ds = MyModel.GetList("PeiXunName Like '%" + this.TextBox1.Text + "%' order by ID desc"); GVData.DataSource = ds; GVData.DataBind(); AspNetPager1.RecordCount = ds.Tables[0].Rows.Count; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtPeiXunName.Text=Model.PeiXunName.ToString(); this.txtPeiXunUser.Text=Model.PeiXunUser.ToString(); this.txtCanYuUser.Text=Model.CanYuUser.ToString(); this.txtStartDate.Text=Model.StartDate.ToString(); this.txtEndDate.Text=Model.EndDate.ToString(); this.txtPeiXunMuDi.Text=Model.PeiXunMuDi.ToString(); this.txtPeiXunNeiRong.Text=Model.PeiXunNeiRong.ToString(); this.txtXiaoGuo.Text=Model.XiaoGuo.ToString(); this.txtBackInfo.Text=Model.BackInfo.ToString(); ZWL.Common.PublicMethod.SetSessionValue("WenJianList", Model.FuJianList); ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList")); this.txtUserName.Text=Model.UserName.ToString(); this.txtTimeStr.Text=Model.TimeStr.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPPeiXun Model = new ZWL.BLL.ERPPeiXun(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtPeiXunName.Text = Model.PeiXunName.ToString(); this.txtPeiXunUser.Text = Model.PeiXunUser.ToString(); this.txtCanYuUser.Text = Model.CanYuUser.ToString(); this.txtStartDate.Text = Model.StartDate.ToString(); this.txtEndDate.Text = Model.EndDate.ToString(); this.txtPeiXunMuDi.Text = Model.PeiXunMuDi.ToString(); this.txtPeiXunNeiRong.Text = Model.PeiXunNeiRong.ToString(); this.txtXiaoGuo.Text = Model.XiaoGuo.ToString(); this.txtBackInfo.Text = Model.BackInfo.ToString(); ZWL.Common.PublicMethod.SetSessionValue("WenJianList", Model.FuJianList); ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList")); this.txtUserName.Text = Model.UserName.ToString(); this.txtTimeStr.Text = Model.TimeStr.ToString(); } }