Example #1
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        ZWL.BLL.ERPSource Model = new ZWL.BLL.ERPSource();

        Model.SourceName     = this.txtSourceName.Text.ToString();
        Model.ShengQingUser  = this.txtShengQingUser.Text.ToString();
        Model.ShiYongUser    = this.txtShiYongUser.Text.ToString();
        Model.ShiYongShiXian = this.txtShiYongShiXian.Text.ToString();
        Model.SourceMiaoShu  = this.txtSourceMiaoShu.Text.ToString();
        Model.NowState       = "等待审核";
        Model.UserName       = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr        = DateTime.Now;
        Model.BackInfo       = this.txtBackInfo.Text.ToString();

        Model.Add();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户添加资源申请信息(" + this.txtSourceName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "资源申请信息添加成功!", "Source.aspx");
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPSource Model = new ZWL.BLL.ERPSource();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblSourceName.Text     = Model.SourceName.ToString();
            this.lblShengQingUser.Text  = Model.ShengQingUser.ToString();
            this.lblShiYongUser.Text    = Model.ShiYongUser.ToString();
            this.lblShiYongShiXian.Text = Model.ShiYongShiXian.ToString();
            this.lblSourceMiaoShu.Text  = Model.SourceMiaoShu.ToString();
            this.lblNowState.Text       = Model.NowState.ToString();
            this.lblUserName.Text       = Model.UserName.ToString();
            this.lblTimeStr.Text        = Model.TimeStr.ToString();
            this.lblBackInfo.Text       = Model.BackInfo.ToString();

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "用户查看资源申请信息(" + this.lblSourceName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Example #3
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPSource MyModel = new ZWL.BLL.ERPSource();
        DataSet           ds      = MyModel.GetList("SourceName Like '%" + this.TextBox1.Text + "%' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPSource Model = new ZWL.BLL.ERPSource();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtSourceName.Text     = Model.SourceName.ToString();
         this.txtShengQingUser.Text  = Model.ShengQingUser.ToString();
         this.txtShiYongUser.Text    = Model.ShiYongUser.ToString();
         this.txtShiYongShiXian.Text = Model.ShiYongShiXian.ToString();
         this.txtSourceMiaoShu.Text  = Model.SourceMiaoShu.ToString();
         this.txtNowState.Text       = Model.NowState.ToString();
         this.txtUserName.Text       = Model.UserName.ToString();
         this.txtTimeStr.Text        = Model.TimeStr.ToString();
         this.txtBackInfo.Text       = Model.BackInfo.ToString();
     }
 }