protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblTextStr.Text = Model.TextStr.ToString(); this.lblImageUrlStr.Text = Model.ImageUrlStr.ToString(); this.lblValueStr.Text = Model.ValueStr.ToString(); this.lblNavigateUrlStr.Text = Model.NavigateUrlStr.ToString(); this.lblTarget.Text = Model.Target.ToString(); this.lblParentID.Text = Model.ParentID.ToString(); this.lblQuanXianList.Text = Model.QuanXianList.ToString(); this.lblPaiXuStr.Text = Model.PaiXuStr.ToString(); this.lblClass.Text = Model.ParentClass; //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看菜单管理信息(" + this.lblTextStr.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../SystemManage/TreeList.aspx" : Request.UrlReferrer.ToString(); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { if (ZWL.Common.PublicMethod.IFExists("ValueStr", "ERPTreeList", int.Parse(Request.QueryString["ID"].ToString()), this.txtValueStr.Text) == true) { ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.ID = int.Parse(Request.QueryString["ID"].ToString()); Model.TextStr = this.txtTextStr.Text.ToString(); Model.ImageUrlStr = this.txtImageUrlStr.Text.ToString(); Model.ValueStr = this.txtValueStr.Text.ToString(); Model.NavigateUrlStr = this.txtNavigateUrlStr.Text.ToString(); Model.Target = this.txtTarget.Text.ToString(); Model.ParentID = int.Parse(this.txtParentID.Text); Model.QuanXianList = this.txtQuanXianList.Text.ToString(); Model.PaiXuStr = int.Parse(this.txtPaiXuStr.Text); Model.ParentClass = this.SelClass.SelectedItem.Value; Model.Update(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户修改菜单管理信息(" + this.txtTextStr.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "菜单管理信息修改成功!", "TreeList.aspx"); } else { ZWL.Common.MessageBox.Show(this, "当前指定的后台数值已经存在,为了保持唯一性,请重新指定!"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.lblTextStr.Text=Model.TextStr.ToString(); this.lblImageUrlStr.Text=Model.ImageUrlStr.ToString(); this.lblValueStr.Text=Model.ValueStr.ToString(); this.lblNavigateUrlStr.Text=Model.NavigateUrlStr.ToString(); this.lblTarget.Text=Model.Target.ToString(); this.lblParentID.Text=Model.ParentID.ToString(); this.lblQuanXianList.Text=Model.QuanXianList.ToString(); this.lblPaiXuStr.Text=Model.PaiXuStr.ToString(); this.lblClass.Text = Model.ParentClass; //дϵͳ��־ ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "�û��鿴�˵�������Ϣ(" + this.lblTextStr.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../SystemManage/TreeList.aspx" : Request.UrlReferrer.ToString(); } }
protected void btn_Sub_Click(object sender, EventArgs e) { if(ZWL.Common.PublicMethod.IFExists("ValueStr", "ERPTreeList", 0, this.txtValueStr.Text) == true) { ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.TextStr = this.txtTextStr.Text.ToString(); Model.ImageUrlStr = this.txtImageUrlStr.Text.ToString(); Model.ValueStr = this.txtValueStr.Text.ToString(); Model.NavigateUrlStr = this.txtNavigateUrlStr.Text.ToString(); Model.Target = this.txtTarget.Text.ToString(); Model.ParentID = int.Parse(this.txtParentID.Text); Model.QuanXianList = this.txtQuanXianList.Text.ToString(); Model.PaiXuStr = int.Parse(this.txtPaiXuStr.Text); Model.ParentClass = this.SelClass.SelectedItem.Value; Model.Add(); //дϵͳ��־ ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "�û���Ӳ˵�������Ϣ(" + this.txtTextStr.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); Response.Write("<script>alert('�˵�������Ϣ��ӳɹ���');window.location.href='TreeList.aspx';</script>"); //ZWL.Common.MessageBox.ShowAndRedirect(this, "�˵�������Ϣ��ӳɹ���", "TreeList.aspx"); } else { Response.Write("<script>alert('��ǰָ���ĺ�̨��ֵ�Ѿ����ڣ�Ϊ�˱���Ψһ�ԣ�������ָ��');</script>"); //ZWL.Common.MessageBox.Show(this, "��ǰָ���ĺ�̨��ֵ�Ѿ����ڣ�Ϊ�˱���Ψһ�ԣ�������ָ����"); } }
protected void btn_Sub_Click(object sender, EventArgs e) { if (ZWL.Common.PublicMethod.IFExists("ValueStr", "ERPTreeList", 0, this.txtValueStr.Text) == true) { ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.TextStr = this.txtTextStr.Text.ToString(); Model.ImageUrlStr = this.txtImageUrlStr.Text.ToString(); Model.ValueStr = this.txtValueStr.Text.ToString(); Model.NavigateUrlStr = this.txtNavigateUrlStr.Text.ToString(); Model.Target = this.txtTarget.Text.ToString(); Model.ParentID = int.Parse(this.txtParentID.Text); Model.QuanXianList = this.txtQuanXianList.Text.ToString(); Model.PaiXuStr = int.Parse(this.txtPaiXuStr.Text); Model.ParentClass = this.SelClass.SelectedItem.Value; Model.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加菜单管理信息(" + this.txtTextStr.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); Response.Write("<script>alert('菜单管理信息添加成功!');window.location.href='TreeList.aspx';</script>"); //ZWL.Common.MessageBox.ShowAndRedirect(this, "菜单管理信息添加成功!", "TreeList.aspx"); } else { Response.Write("<script>alert('当前指定的后台数值已经存在,为了保持唯一性,请重新指定');</script>"); //ZWL.Common.MessageBox.Show(this, "当前指定的后台数值已经存在,为了保持唯一性,请重新指定!"); } }
public void DataBindToGridview(string IDList) { ZWL.BLL.ERPTreeList MyModel = new ZWL.BLL.ERPTreeList(); if (IDList.Trim().Length > 0) { GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' and ID in(" + IDList + ") order by ParentID asc,PaiXuStr asc,ID asc"); } else { GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' order by ParentID asc,PaiXuStr asc,ID asc"); } 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.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtTextStr.Text = Model.TextStr.ToString(); this.txtImageUrlStr.Text = Model.ImageUrlStr.ToString(); this.txtValueStr.Text = Model.ValueStr.ToString(); this.txtNavigateUrlStr.Text = Model.NavigateUrlStr.ToString(); this.txtTarget.Text = Model.Target.ToString(); this.txtParentID.Text = Model.ParentID.ToString(); this.txtQuanXianList.Text = Model.QuanXianList.ToString(); this.txtPaiXuStr.Text = Model.PaiXuStr.ToString(); this.SelClass.SelectedValue = Model.ParentClass; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPTreeList Model = new ZWL.BLL.ERPTreeList(); Model.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.txtTextStr.Text=Model.TextStr.ToString(); this.txtImageUrlStr.Text=Model.ImageUrlStr.ToString(); this.txtValueStr.Text=Model.ValueStr.ToString(); this.txtNavigateUrlStr.Text=Model.NavigateUrlStr.ToString(); this.txtTarget.Text=Model.Target.ToString(); this.txtParentID.Text=Model.ParentID.ToString(); this.txtQuanXianList.Text=Model.QuanXianList.ToString(); this.txtPaiXuStr.Text=Model.PaiXuStr.ToString(); this.SelClass.SelectedValue = Model.ParentClass; ReturnInput.Value = Request.UrlReferrer.ToString() == null ? "../SystemManage/TreeList.aspx" : Request.UrlReferrer.ToString(); } }