Beispiel #1
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.Vehicle   bll   = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            model.MotorcadeName   = ddlMotorcadeName.SelectedValue;
            model.CarCode         = txtCarCode.Text.Trim();
            model.CarNumber       = string.IsNullOrEmpty(txtCarNumber.Text.Trim()) ? model.CarCode : txtCarNumber.Text.Trim();
            model.MotorcycleType  = ddlMotorcycleType.SelectedValue;
            model.EngineType      = txtEngineType.Text.Trim();
            model.ChassisNumber   = txtChassisNumber.Text.Trim();
            model.FrameNumber     = txtFrameNumber.Text.Trim();
            model.InsuranceNumber = txtInsuranceNumber.Text.Trim();
            model.LoadingCapacity = Utils.StrToDecimal(txtLoadingCapacity.Text.Trim(), 0.00M);
            model.Remarks         = txtRemarks.Text.Trim();

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆信息:" + model.CarCode); //记录日志
                result = true;
            }
            return(result);
        }
Beispiel #2
0
 private void ShowInfo(int _id)
 {
     BLL.Vehicle   bll   = new BLL.Vehicle();
     Model.Vehicle model = bll.GetModel(_id);
     txtPlateNumber.Text = model.PlateNumber;
     txtDriver.Text      = model.Driver;
     txtLinkTel.Text     = model.LinkTel;
     txtLinkAddress.Text = model.LinkAddress;
     txtRemark.Text      = model.Remark;
 }
Beispiel #3
0
        private void ShowInfo(int _id)
        {
            BLL.Vehicle   bll   = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            ddlMotorcadeName.SelectedValue = model.MotorcadeName;
            txtCarCode.Text   = model.CarCode;
            txtCarNumber.Text = model.CarNumber;
            ddlMotorcycleType.SelectedValue = model.MotorcycleType;
            txtEngineType.Text      = model.EngineType;
            txtChassisNumber.Text   = model.ChassisNumber;
            txtFrameNumber.Text     = model.FrameNumber;
            txtInsuranceNumber.Text = model.InsuranceNumber;
            txtLoadingCapacity.Text = model.LoadingCapacity.ToString();
            txtRemarks.Text         = model.Remarks;
        }
Beispiel #4
0
        private void ShowInfo(int _id)
        {
            BLL.Vehicle   bll   = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);
            if (model != null)
            {
                txtCarCode.Text = model.CarCode;

                BLL.Driver   driverBLL = new BLL.Driver();
                Model.Driver driver    = driverBLL.GetModel(model.CarCode);
                if (driver != null)
                {
                    txtRealName.Text = driver.RealName;
                    txtLinkTel.Text  = driver.LinkTel;
                }
            }
        }
Beispiel #5
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.Vehicle   bll       = new BLL.Vehicle();
            Model.Vehicle model     = bll.GetModel(_id);
            string        carNumber = model.CarNumber;

            model.MotorcadeName   = "";
            model.CarCode         = txtCarCode.Text.Trim();
            model.CarNumber       = model.CarCode;
            model.MotorcycleType  = "";
            model.EngineType      = "";
            model.ChassisNumber   = "";
            model.FrameNumber     = "";
            model.InsuranceNumber = "";
            model.LoadingCapacity = 0.00M;
            model.Remarks         = "";


            BLL.Driver   driverBll = new BLL.Driver();
            Model.Driver driver    = driverBll.GetModel(carNumber);

            driver.CarNumber           = model.CarNumber;
            driver.RealName            = txtRealName.Text.Trim();
            driver.RealNameCode        = "";
            driver.IdCardNumber        = "";
            driver.LinkTel             = txtLinkTel.Text.Trim();
            driver.LinkAddress         = "";
            driver.BeganWorkDate       = DateTime.Now;
            driver.IssuedDate          = DateTime.Now;
            driver.AnnualDate          = DateTime.Now;
            driver.DrivingLicence      = "";
            driver.DrivingPermitNumber = "";
            driver.DrivingPermitType   = "";
            driver.IsDimission         = 0;
            driver.Remarks             = "";

            if (bll.Update(model, driver))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆信息:" + model.CarCode); //记录日志
                result = true;
            }
            return(result);
        }
Beispiel #6
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.Vehicle   bll   = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            model.PlateNumber = txtPlateNumber.Text;
            model.Driver      = txtDriver.Text;
            model.LinkTel     = txtLinkTel.Text;
            model.LinkAddress = txtLinkAddress.Text;
            model.Remark      = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆:" + model.PlateNumber); //记录日志
                result = true;
            }

            return(result);
        }
Beispiel #7
0
        private void ShowInfo(int _id)
        {
            BLL.Vehicle bll = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            ddlMotorcadeName.SelectedValue = model.MotorcadeName;
            txtCarCode.Text = model.CarCode;
            txtCarNumber.Text = model.CarNumber;
            ddlMotorcycleType.SelectedValue = model.MotorcycleType;
            txtEngineType.Text = model.EngineType;
            txtChassisNumber.Text = model.ChassisNumber;
            txtFrameNumber.Text = model.FrameNumber;
            txtInsuranceNumber.Text = model.InsuranceNumber;
            txtLoadingCapacity.Text = model.LoadingCapacity.ToString();
            txtRemarks.Text = model.Remarks;
        }
Beispiel #8
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.Vehicle bll = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            model.MotorcadeName = ddlMotorcadeName.SelectedValue;
            model.CarCode = txtCarCode.Text.Trim();
            model.CarNumber = string.IsNullOrEmpty(txtCarNumber.Text.Trim()) ? model.CarCode : txtCarNumber.Text.Trim();
            model.MotorcycleType = ddlMotorcycleType.SelectedValue;
            model.EngineType = txtEngineType.Text.Trim();
            model.ChassisNumber = txtChassisNumber.Text.Trim();
            model.FrameNumber = txtFrameNumber.Text.Trim();
            model.InsuranceNumber = txtInsuranceNumber.Text.Trim();
            model.LoadingCapacity = Utils.StrToDecimal(txtLoadingCapacity.Text.Trim(), 0.00M);
            model.Remarks = txtRemarks.Text.Trim();

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆信息:" + model.CarCode); //记录日志
                result = true;
            }
            return result;
        }
Beispiel #9
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.Vehicle bll = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);

            model.PlateNumber = txtPlateNumber.Text;
            model.Driver = txtDriver.Text;
            model.LinkTel = txtLinkTel.Text;
            model.LinkAddress = txtLinkAddress.Text;
            model.Remark = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆:" + model.PlateNumber); //记录日志
                result = true;
            }

            return result;
        }
Beispiel #10
0
 private void ShowInfo(int _id)
 {
     BLL.Vehicle bll = new BLL.Vehicle();
     Model.Vehicle model = bll.GetModel(_id);
     txtPlateNumber.Text = model.PlateNumber;
     txtDriver.Text = model.Driver;
     txtLinkTel.Text = model.LinkTel;
     txtLinkAddress.Text = model.LinkAddress;
     txtRemark.Text = model.Remark;
 }
Beispiel #11
0
        private void ShowInfo(int _id)
        {
            BLL.Vehicle bll = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);
            if (model != null)
            {
                txtCarCode.Text = model.CarCode;

                BLL.Driver driverBLL = new BLL.Driver();
                Model.Driver driver = driverBLL.GetModel(model.CarCode);
                if (driver != null)
                {
                    txtRealName.Text = driver.RealName;
                    txtLinkTel.Text = driver.LinkTel;
                }
            }
        }
Beispiel #12
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.Vehicle bll = new BLL.Vehicle();
            Model.Vehicle model = bll.GetModel(_id);
            string carNumber = model.CarNumber;

            model.MotorcadeName = "";
            model.CarCode = txtCarCode.Text.Trim();
            model.CarNumber = model.CarCode;
            model.MotorcycleType = "";
            model.EngineType = "";
            model.ChassisNumber = "";
            model.FrameNumber = "";
            model.InsuranceNumber = "";
            model.LoadingCapacity = 0.00M;
            model.Remarks = "";

            BLL.Driver driverBll = new BLL.Driver();
            Model.Driver driver = driverBll.GetModel(carNumber);

            driver.CarNumber = model.CarNumber;
            driver.RealName = txtRealName.Text.Trim();
            driver.RealNameCode = "";
            driver.IdCardNumber = "";
            driver.LinkTel = txtLinkTel.Text.Trim();
            driver.LinkAddress = "";
            driver.BeganWorkDate = DateTime.Now;
            driver.IssuedDate = DateTime.Now;
            driver.AnnualDate = DateTime.Now;
            driver.DrivingLicence = "";
            driver.DrivingPermitNumber = "";
            driver.DrivingPermitType = "";
            driver.IsDimission = 0;
            driver.Remarks = "";

            if (bll.Update(model, driver))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改车辆信息:" + model.CarCode); //记录日志
                result = true;
            }
            return result;
        }