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

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

            model.CarNumber           = ddlCarNumber.SelectedValue;
            model.RealName            = txtRealName.Text.Trim();
            model.RealNameCode        = txtRealNameCode.Text.Trim();
            model.IdCardNumber        = txtIdCardNumber.Text.Trim();
            model.LinkTel             = txtLinkTel.Text.Trim();
            model.LinkAddress         = txtLinkAddress.Text.Trim();
            model.BeganWorkDate       = Utils.StrToDateTime(txtBeganWorkDate.Text.Trim());
            model.IssuedDate          = Utils.StrToDateTime(txtIssuedDate.Text.Trim());
            model.AnnualDate          = Utils.StrToDateTime(txtAnnualDate.Text.Trim());
            model.DrivingLicence      = txtDrivingLicence.Text.Trim();
            model.DrivingPermitNumber = txtDrivingPermitNumber.Text.Trim();
            model.DrivingPermitType   = txtDrivingPermitType.Text.Trim();
            model.IsDimission         = chkIsDimission.Checked ? 1 : 0;
            model.Remarks             = txtRemarks.Text.Trim();

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改司机信息:" + model.RealName); //记录日志
                result = true;
            }
            return(result);
        }
예제 #2
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;
                }
            }
        }
예제 #3
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);
        }
예제 #4
0
        private void ShowInfo(int _id)
        {
            BLL.Driver   bll   = new BLL.Driver();
            Model.Driver model = bll.GetModel(_id);

            ddlCarNumber.SelectedValue  = model.CarNumber;
            txtRealName.Text            = model.RealName;
            txtRealNameCode.Text        = model.RealNameCode;
            txtIdCardNumber.Text        = model.IdCardNumber;
            txtLinkTel.Text             = model.LinkTel;
            txtLinkAddress.Text         = model.LinkAddress;
            txtBeganWorkDate.Text       = model.BeganWorkDate.ToString("yyyy-MM-dd");
            txtIssuedDate.Text          = model.IssuedDate.ToString("yyyy-MM-dd");
            txtAnnualDate.Text          = model.AnnualDate.ToString("yyyy-MM-dd");
            txtDrivingLicence.Text      = model.DrivingLicence;
            txtDrivingPermitNumber.Text = model.DrivingPermitNumber;
            txtDrivingPermitType.Text   = model.DrivingPermitType;
            chkIsDimission.Checked      = (model.IsDimission == 1);
            txtRemarks.Text             = model.Remarks;
        }
예제 #5
0
        private void ShowInfo(int _id)
        {
            BLL.Driver bll = new BLL.Driver();
            Model.Driver model = bll.GetModel(_id);

            ddlCarNumber.SelectedValue = model.CarNumber;
            txtRealName.Text = model.RealName;
            txtRealNameCode.Text = model.RealNameCode;
            txtIdCardNumber.Text = model.IdCardNumber;
            txtLinkTel.Text = model.LinkTel;
            txtLinkAddress.Text = model.LinkAddress;
            txtBeganWorkDate.Text = model.BeganWorkDate.ToString("yyyy-MM-dd");
            txtIssuedDate.Text = model.IssuedDate.ToString("yyyy-MM-dd");
            txtAnnualDate.Text = model.AnnualDate.ToString("yyyy-MM-dd");
            txtDrivingLicence.Text = model.DrivingLicence;
            txtDrivingPermitNumber.Text = model.DrivingPermitNumber;
            txtDrivingPermitType.Text = model.DrivingPermitType;
            chkIsDimission.Checked = (model.IsDimission == 1);
            txtRemarks.Text = model.Remarks;
        }
예제 #6
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.Driver bll = new BLL.Driver();
            Model.Driver model = bll.GetModel(_id);

            model.CarNumber = ddlCarNumber.SelectedValue;
            model.RealName = txtRealName.Text.Trim();
            model.RealNameCode = txtRealNameCode.Text.Trim();
            model.IdCardNumber = txtIdCardNumber.Text.Trim();
            model.LinkTel = txtLinkTel.Text.Trim();
            model.LinkAddress = txtLinkAddress.Text.Trim();
            model.BeganWorkDate = Utils.StrToDateTime(txtBeganWorkDate.Text.Trim());
            model.IssuedDate = Utils.StrToDateTime(txtIssuedDate.Text.Trim());
            model.AnnualDate = Utils.StrToDateTime(txtAnnualDate.Text.Trim());
            model.DrivingLicence = txtDrivingLicence.Text.Trim();
            model.DrivingPermitNumber = txtDrivingPermitNumber.Text.Trim();
            model.DrivingPermitType = txtDrivingPermitType.Text.Trim();
            model.IsDimission = chkIsDimission.Checked ? 1 : 0;
            model.Remarks = txtRemarks.Text.Trim();

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改司机信息:" + model.RealName); //记录日志
                result = true;
            }
            return result;
        }
예제 #7
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;
                }
            }
        }
예제 #8
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;
        }