63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
|
|
public partial class Car_CarInfoModify : System.Web.UI.Page
|
|
{
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
ZWL.Common.PublicMethod.CheckSession();
|
|
ZWL.BLL.ERPCarInfo Model = new ZWL.BLL.ERPCarInfo();
|
|
Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
|
|
this.txtCarName.Text=Model.CarName.ToString();
|
|
this.txtCarPaiHao.Text=Model.CarPaiHao.ToString();
|
|
this.txtCarXingHao.Text=Model.CarXingHao.ToString();
|
|
this.txtLeiXing.Text=Model.LeiXing.ToString();
|
|
this.txtDriverUser.Text=Model.DriverUser.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();
|
|
this.TextBox1.Text = Model.SuoShuDep.ToString();
|
|
}
|
|
}
|
|
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
|
|
{
|
|
ZWL.BLL.ERPCarInfo Model = new ZWL.BLL.ERPCarInfo();
|
|
|
|
Model.ID = int.Parse(Request.QueryString["ID"].ToString());
|
|
Model.CarName=this.txtCarName.Text.ToString();
|
|
Model.CarPaiHao=this.txtCarPaiHao.Text.ToString();
|
|
Model.CarXingHao=this.txtCarXingHao.Text.ToString();
|
|
Model.LeiXing=this.txtLeiXing.Text.ToString();
|
|
Model.DriverUser=this.txtDriverUser.Text.ToString();
|
|
Model.NowState=this.txtNowState.Text.ToString();
|
|
Model.UserName=this.txtUserName.Text.ToString();
|
|
Model.TimeStr=DateTime.Parse(this.txtTimeStr.Text);
|
|
Model.BackInfo=this.txtBackInfo.Text.ToString();
|
|
Model.SuoShuDep = this.TextBox1.Text.ToString();
|
|
|
|
Model.Update();
|
|
|
|
//дϵͳÈÕÖ¾
|
|
ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
|
|
MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|
MyRiZhi.DoSomething = "Óû§Ð޸ijµÁ¾¹ÜÀíÐÅÏ¢(" + this.txtCarName.Text + ")";
|
|
MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
|
|
MyRiZhi.Add();
|
|
|
|
ZWL.Common.MessageBox.ShowAndRedirect(this, "³µÁ¾¹ÜÀíÐÅÏ¢Ð޸ijɹ¦£¡", "CarInfo.aspx");
|
|
}
|
|
}
|