Esempio n. 1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPCarWeiZhang Model = new ZWL.BLL.ERPCarWeiZhang();

        Model.CarName    = this.txtCarName.Text.ToString();
        Model.WZDate     = this.txtWZDate.Text.ToString();
        Model.DriverUser = this.txtDriverUser.Text.ToString();
        Model.WZAddress  = this.txtWZAddress.Text.ToString();
        Model.KouFenNum  = this.txtKouFenNum.Text.ToString();
        Model.FKJinE     = this.txtFKJinE.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, "车辆违章记录信息添加成功!", "CarWeiZhang.aspx");
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPCarWeiZhang Model = new ZWL.BLL.ERPCarWeiZhang();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblCarName.Text    = Model.CarName.ToString();
            this.lblWZDate.Text     = Model.WZDate.ToString();
            this.lblDriverUser.Text = Model.DriverUser.ToString();
            this.lblWZAddress.Text  = Model.WZAddress.ToString();
            this.lblKouFenNum.Text  = Model.KouFenNum.ToString();
            this.lblFKJinE.Text     = Model.FKJinE.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();
        }
    }
Esempio n. 3
0
 public void DataBindToGridview(string IDList)
 {
     ZWL.BLL.ERPCarWeiZhang MyModel = new ZWL.BLL.ERPCarWeiZhang();
     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();
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPCarWeiZhang Model = new ZWL.BLL.ERPCarWeiZhang();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtCarName.Text    = Model.CarName.ToString();
         this.txtWZDate.Text     = Model.WZDate.ToString();
         this.txtDriverUser.Text = Model.DriverUser.ToString();
         this.txtWZAddress.Text  = Model.WZAddress.ToString();
         this.txtKouFenNum.Text  = Model.KouFenNum.ToString();
         this.txtFKJinE.Text     = Model.FKJinE.ToString();
         this.txtUserName.Text   = Model.UserName.ToString();
         this.txtTimeStr.Text    = Model.TimeStr.ToString();
         this.txtBackInfo.Text   = Model.BackInfo.ToString();
     }
 }