Beispiel #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPCarJiaYou Model = new ZWL.BLL.ERPCarJiaYou();

        Model.CarName       = this.txtCarName.Text.ToString();
        Model.JYDate        = this.txtJYDate.Text.ToString();
        Model.JingBanUser   = this.txtJingBanUser.Text.ToString();
        Model.DriverUser    = this.txtDriverUser.Text.ToString();
        Model.JiaYouAddress = this.txtJiaYouAddress.Text.ToString();
        Model.StartNum      = this.txtStartNum.Text.ToString();
        Model.JiaYouNum     = this.txtJiaYouNum.Text.ToString();
        Model.YouFeiJinE    = this.txtYouFeiJinE.Text.ToString();
        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.txtCarName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "车辆加油记录信息添加成功!", "CarJiaYou.aspx");
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPCarJiaYou Model = new ZWL.BLL.ERPCarJiaYou();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblCarName.Text       = Model.CarName.ToString();
            this.lblJYDate.Text        = Model.JYDate.ToString();
            this.lblJingBanUser.Text   = Model.JingBanUser.ToString();
            this.lblDriverUser.Text    = Model.DriverUser.ToString();
            this.lblJiaYouAddress.Text = Model.JiaYouAddress.ToString();
            this.lblStartNum.Text      = Model.StartNum.ToString();
            this.lblJiaYouNum.Text     = Model.JiaYouNum.ToString();
            this.lblYouFeiJinE.Text    = Model.YouFeiJinE.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.lblCarName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Beispiel #3
0
 public void DataBindToGridview(string IDList)
 {
     ZWL.BLL.ERPCarJiaYou MyModel = new ZWL.BLL.ERPCarJiaYou();
     if (IDList.Trim().Length > 0)
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' and ID in(" + IDList + ") order by ID desc");
     }
     else
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' 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();
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPCarJiaYou Model = new ZWL.BLL.ERPCarJiaYou();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtCarName.Text       = Model.CarName.ToString();
         this.txtJYDate.Text        = Model.JYDate.ToString();
         this.txtJingBanUser.Text   = Model.JingBanUser.ToString();
         this.txtDriverUser.Text    = Model.DriverUser.ToString();
         this.txtJiaYouAddress.Text = Model.JiaYouAddress.ToString();
         this.txtStartNum.Text      = Model.StartNum.ToString();
         this.txtJiaYouNum.Text     = Model.JiaYouNum.ToString();
         this.txtYouFeiJinE.Text    = Model.YouFeiJinE.ToString();
         this.txtUserName.Text      = Model.UserName.ToString();
         this.txtTimeStr.Text       = Model.TimeStr.ToString();
         this.txtBackInfo.Text      = Model.BackInfo.ToString();
     }
 }