Esempio n. 1
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPOfficething MyModel = new ZWL.BLL.ERPOfficething();
        DataSet ds = MyModel.GetList("ShenQingThing 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.ERPOfficething Model = new ZWL.BLL.ERPOfficething();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtShenQingThing.Text = Model.ShenQingThing.ToString();
         this.txtTypeStr.Text       = Model.TypeStr.ToString();
         this.txtShengQingNum.Text  = Model.ShengQingNum.ToString();
         this.txtNowState.Text      = Model.NowState.ToString();
         this.txtUserName.Text      = Model.UserName.ToString();
         this.txtTimeStr.Text       = Model.TimeStr.ToString();
     }
 }
Esempio n. 3
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPOfficething Model = new ZWL.BLL.ERPOfficething();

        Model.ShenQingThing = this.txtShenQingThing.Text.ToString();
        Model.TypeStr       = this.txtTypeStr.Text.ToString();
        Model.ShengQingNum  = this.txtShengQingNum.Text.ToString();
        Model.NowState      = "等待审核";
        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.txtShenQingThing.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "办公用品信息添加成功!", "OfficeShengQing.aspx");
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPOfficething Model = new ZWL.BLL.ERPOfficething();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblShenQingThing.Text = Model.ShenQingThing.ToString();
            this.lblTypeStr.Text       = Model.TypeStr.ToString();
            this.lblShengQingNum.Text  = Model.ShengQingNum.ToString();
            this.lblNowState.Text      = Model.NowState.ToString();
            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.lblShenQingThing.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }