Пример #1
0
        private bool DoAdd()
        {
            bool result = false;

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

            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.Add(model) > 0)
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.CarCode); //记录日志
                result = true;
            }
            return(result);
        }
Пример #2
0
        private bool DoAdd()
        {
            bool result = false;

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

            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         = "";

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

            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.Add(model, driver))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.CarCode); //记录日志
                result = true;
            }
            return(result);
        }
Пример #3
0
        private bool DoAdd()
        {
            bool result = false;

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

            model.PlateNumber = txtPlateNumber.Text;
            model.Driver      = txtDriver.Text;
            model.LinkTel     = txtLinkTel.Text;
            model.LinkAddress = txtLinkAddress.Text;
            model.Remark      = txtRemark.Text;
            if (bll.Add(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.PlateNumber); //记录日志
                result = true;
            }
            return(result);
        }
Пример #4
0
        private bool DoAdd()
        {
            bool result = false;
            Model.Vehicle model = new Model.Vehicle();
            BLL.Vehicle bll = new BLL.Vehicle();

            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.Add(model) > 0)
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.CarCode); //记录日志
                result = true;
            }
            return result;
        }
Пример #5
0
        private bool DoAdd()
        {
            bool result = false;
            Model.Vehicle model = new Model.Vehicle();
            BLL.Vehicle bll = new BLL.Vehicle();

            model.PlateNumber = txtPlateNumber.Text;
            model.Driver = txtDriver.Text;
            model.LinkTel = txtLinkTel.Text;
            model.LinkAddress = txtLinkAddress.Text;
            model.Remark = txtRemark.Text;
            if (bll.Add(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.PlateNumber); //记录日志
                result = true;
            }
            return result;
        }
Пример #6
0
        private bool DoAdd()
        {
            bool result = false;
            Model.Vehicle model = new Model.Vehicle();
            BLL.Vehicle bll = new BLL.Vehicle();

            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 = "";

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

            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.Add(model, driver))
            {
                AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加车辆:" + model.CarCode); //记录日志
                result = true;
            }
            return result;
        }