Esempio n. 1
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPMoBan MyModel = new ZWL.BLL.ERPMoBan();
        DataSet          ds      = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPMoBan MyModel = new ZWL.BLL.ERPMoBan();
         MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.TextBox1.Text = MyModel.TitleStr;
         this.RadioButtonList1.SelectedValue = MyModel.IFShare;
         this.TxtContent.Text = MyModel.ContentStr;
     }
 }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPMoBan MyModel = new ZWL.BLL.ERPMoBan();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.Label1.Text = MyModel.TitleStr;
            this.Label2.Text = MyModel.IFShare;
            this.Label3.Text = MyModel.ContentStr;

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "查看模板信息(" + this.Label1.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Esempio n. 4
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPMoBan Model = new ZWL.BLL.ERPMoBan();
        Model.ID         = int.Parse(Request.QueryString["ID"].ToString());
        Model.TitleStr   = this.TextBox1.Text;
        Model.ContentStr = this.TxtContent.Text;
        Model.IFShare    = this.RadioButtonList1.SelectedItem.Text;
        Model.TimeStr    = DateTime.Now;
        Model.UserName   = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.Update();

        //写系统日志
        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, "常用模板修改成功!", "MyMoBan.aspx");
    }