Пример #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);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
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;
        }
Пример #5
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;
        }
Пример #6
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;
        }