コード例 #1
0
        public void ReturnMotor(Manager manager)
        {
            Console.Clear();
            MotorBL mtbl = new MotorBL();
            bool    a    = false;

            Customers  customer   = new Customers();
            Motor      motor      = new Motor();
            ContractBL contractBL = new ContractBL();
            Contract   contract   = new Contract();

            Console.WriteLine("---------------------------------------------------");
            Console.WriteLine("--------------Tra Xe----------");
            Console.WriteLine("--------------------------------------------------");
            customer = InputCustomerReturnMotor();
            motor    = InputMotorReturnMotor();

            try
            {
                contractBL.ReturnMotor(customer, motor, contract);
                a = true;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                a = false;
            }
            if (a == true)
            {
                Console.WriteLine("TRA XE THANH CONG.");
            }
        }
コード例 #2
0
        public ActionResult Edit()
        {
            try
            {
                string _url = "/ModuleContracts/Refuse/List";
                string _ok  = CommonFunc.Nvs_Redirect_QuyenTruyCapUser(_url);
                if (_ok != "")
                {
                    return(Redirect(_ok));
                }

                decimal _id = 0;
                if (RouteData.Values["id"] != null)
                {
                    _id = Convert.ToDecimal(RouteData.Values["id"]);
                }
                if (RouteData.Values["id1"] != null)
                {
                    ViewBag.CurrTab = Convert.ToInt16(RouteData.Values["id1"]);
                }
                else
                {
                    ViewBag.CurrTab = 3;
                }

                ContractBL     _ObjBL   = new ContractBL();
                Contracts_Info _objInfo = _ObjBL.Contract_GetById(_id);
                return(View(_objInfo));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(View());
            }
        }
コード例 #3
0
        public void loadContract()
        {
            dgvPackage.RowTemplate.Height = 40;
            dgvPackage.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
            dgvPackage.AllowUserToAddRows = false;
            dgvPackage.EditMode           = DataGridViewEditMode.EditProgrammatically;

            DataTable empDT = new DataTable();

            txtIDSeller.Text = GLOBAL.username.ToUpper();
            empDT            = emp.getEmployeebyID(GLOBAL.username);
            if (empDT.Rows.Count > 0)
            {
                txtNameSeller.Text = empDT.Rows[0][3].ToString() + " " + empDT.Rows[0][4].ToString();
            }
            else
            {
                txtNameSeller.Text = "Admin";
            }
            //Lấy KH và Contract ID tự động
            ContractBL conbl = new ContractBL();

            txtIDContract.Text = conbl.loadIDContract();
            txtIDMember.Text   = conbl.loadIDMEMBER();
            txtUserID.Text     = txtIDMember.Text;
        }
コード例 #4
0
        public ActionResult LoadDataWarning()
        {
            try
            {
                User_Info currentUser = (User_Info)SessionData.CurrentUser;
                if (currentUser == null)
                {
                    return(Redirect("~/home/admin"));
                }

                ContractBL _ObjBL = new ContractBL();

                List <Contracts_Info> lst_data = new List <Contracts_Info>();
                decimal Receive_Number         = -1;
                decimal Receive_Year           = -1;
                decimal WareHouse_Id           = -1;
                decimal Business_Id            = -1;
                int     p_totalrecord          = 0;

                lst_data = _ObjBL.TableSearch("", DateTime.MinValue, -1, currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                              Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                              "CONTRACT_CODE ASC", 1, 0, ref p_totalrecord);

                decimal _count_ChoDuyet = 0;
                decimal _count_DaDuyet  = 0;
                decimal _count_HuyDuyet = 0;

                foreach (Contracts_Info item in lst_data)
                {
                    if (item.Status == (decimal)NaviCommon.Enum_Contract_Status.ChoDuyet)
                    {
                        _count_ChoDuyet++;
                    }
                    else if (item.Status == (decimal)NaviCommon.Enum_Contract_Status.Da_Duyet)
                    {
                        _count_DaDuyet++;
                    }
                    else if (item.Status == (decimal)NaviCommon.Enum_Contract_Status.Huy_Duyet)
                    {
                        _count_HuyDuyet++;
                    }
                }

                p_totalrecord = 0;
                lst_data      = _ObjBL.Contract_Search_ThanhKhoan("", DateTime.MinValue, -1, currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                                                  Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                                  "A.CONTRACT_CODE ASC", 1, 0, ref p_totalrecord);

                string str_result = _count_ChoDuyet + "|" + _count_HuyDuyet + "|" + lst_data.Count.ToString();

                return(Json(new { value = str_result }));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(Json(new { value = "" }));
            }
        }
コード例 #5
0
        private void ExcelworksheetOnChange(Excel.Range target)
        {
            var targetRowAdress = Convert.ToInt32(ContractBL.GetRowAdressByRange(target));

            if (SupplierContractsOutputList.Contains(targetRowAdress))
            {
                return;
            }

            ContractBL.FeelContractsSummary(SupplierContractsOutputList, _contractsWorksheet);
        }
コード例 #6
0
        private void dgvSearchMember_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int index = dgvSearchMember.CurrentCell.RowIndex;

            GETMember.IDMember = dgvSearchMember.Rows[index].Cells[0].Value.ToString();
            txtIsMember.Text   = GETMember.IDMember;
            ContractBL conbl = new ContractBL();

            txtIsContract.Text = conbl.loadIDContract();
            loadDVG(dgvSearchContract);
            dgvSearchContract.DataSource = mem.getRenewMemberByID(GETMember.IDMember);
        }
コード例 #7
0
        public ActionResult List()
        {
            try
            {
                string _url = Request.RawUrl;
                string _ok  = CommonFunc.Nvs_Redirect_QuyenTruyCapUser(_url);
                if (_ok != "")
                {
                    return(Redirect(_ok));
                }

                decimal Receive_Number = -1;
                decimal Receive_Year   = -1;
                decimal WareHouse_Id   = -1;
                decimal Business_Id    = -1;

                int p_totalrecord = 0;
                int p_start       = Common.cNumberRecordOnPage * (1 - 1) + 1;
                int p_end         = Common.cNumberRecordOnPage * 1;
                List <Declaration_Info> lst_data = new List <Declaration_Info>();
                Declaration_BL          _ObjBL   = new Declaration_BL();
                lst_data = _ObjBL.DeclarationTableSearch(SessionData.CurrentUser.User_Id.ToString(), SessionData.CurrentUser.User_Type, SessionData.CurrentUser.User_Name,
                                                         "", "", "", "", "", Convert.ToInt16(NaviCommon.Enum_Declaration_Type.ToKhai_Xuat),
                                                         Convert.ToInt16(NaviCommon.Enum_Contract_Status.ChoDuyet), "01/01/0001", -1, "01/01/0001", "",
                                                         "DECLARATION_CODE ASC",
                                                         p_start, p_end, ref p_totalrecord);
                ViewBag.Declaration = lst_data;
                List <Contracts_Info> lstContract  = new List <Contracts_Info>();
                ContractBL            _ContractjBL = new ContractBL();

                lstContract = _ContractjBL.TableSearch("", DateTime.MinValue, Convert.ToInt16(NaviCommon.Enum_Contract_Status.Da_Duyet),
                                                       SessionData.CurrentUser.User_Type, SessionData.CurrentUser.User_Id.ToString(), SessionData.CurrentUser.User_Name,
                                                       Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                       "CONTRACT_CODE ASC", 0, 0, ref p_totalrecord);
                ViewBag.ListContract = lstContract;

                p_totalrecord = 0;
                List <Declaration_Info> lst_Dec = new List <Declaration_Info>();
                lst_Dec = _ObjBL.DeclarationTableSearch(SessionData.CurrentUser.User_Id.ToString(), SessionData.CurrentUser.User_Type, SessionData.CurrentUser.User_Name, "", "", "", "", "", Convert.ToInt16(NaviCommon.Enum_Declaration_Type.ToKhai_Nhap),
                                                        (Int16)NaviCommon.Enum_Contract_Status.Da_Duyet,
                                                        "01/01/0001", -1, "01/01/0001", "", "DECLARATION_CODE ASC",
                                                        0, 0, ref p_totalrecord);
                ViewBag.DeclarationSearch = lst_Dec;
                return(View());
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(Json(new { success = -1 }));
            }
        }
コード例 #8
0
 public ActionResult ChangeStatusContract(decimal P_ID, string P_REASON_REJECT, int P_STATUS)
 {
     try
     {
         ContractBL _ContractBL = new ContractBL();
         bool       _rel        = _ContractBL.Contract_Update_Status(P_ID, (decimal)NaviCommon.Enum_Contract_Status.Thanh_Khoan, "", SessionData.CurrentUser.User_Name);
         return(Json(new { success = _rel }));
     }
     catch (Exception ex)
     {
         NaviCommon.Common.log.Error(ex.ToString());
         return(Json(new { success = false }));
     }
 }
コード例 #9
0
 public ActionResult ViewDetails(decimal p_id)
 {
     try
     {
         ContractBL     _ObjBL   = new ContractBL();
         Contracts_Info _objInfo = _ObjBL.Contract_GetById(p_id);
         return(PartialView("ViewDetails", _objInfo));
     }
     catch (Exception ex)
     {
         NaviCommon.Common.log.Error(ex.ToString());
         return(View());
     }
 }
コード例 #10
0
 public ActionResult DeleteContract(decimal P_ID)
 {
     try
     {
         ContractBL _ContractBL = new ContractBL();
         decimal    _rel        = _ContractBL.Contract_Delete(P_ID);
         return(Json(new { success = _rel }));
     }
     catch (Exception ex)
     {
         NaviCommon.Common.log.Error(ex.ToString());
         return(Json(new { success = false }));
     }
 }
コード例 #11
0
        public ActionResult ListSearch_Datas(int p_issearch, string p_keysearch, string p_orderby, string p_ordertype, int p_currentpage)
        {
            try
            {
                User_Info currentUser = (User_Info)SessionData.CurrentUser;

                int p_start       = Common.cNumberRecordOnPage * (p_currentpage - 1) + 1;
                int p_end         = Common.cNumberRecordOnPage * p_currentpage;
                int p_totalrecord = 0;

                decimal Receive_Number = -1;
                decimal Receive_Year   = -1;
                decimal WareHouse_Id   = -1;
                decimal Business_Id    = -1;

                List <Contracts_Info> lst_data = new List <Contracts_Info>();
                ContractBL            _ObjBL   = new ContractBL();
                if (!string.IsNullOrEmpty(p_keysearch))
                {
                    string[] arr_keysearch = p_keysearch.Split('|');
                    if (arr_keysearch.Length == 2)
                    {
                        lst_data = _ObjBL.Contract_Search_ThanhKhoan(arr_keysearch[0],
                                                                     string.IsNullOrEmpty(arr_keysearch[1])?DateTime.MinValue:Convert.ToDateTime(arr_keysearch[1]),
                                                                     Convert.ToInt16(NaviCommon.Enum_Contract_Status.Da_Duyet),
                                                                     currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                                                     Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                                     p_orderby + " " + p_ordertype, p_start, p_end, ref p_totalrecord);
                    }
                }
                else// TRƯỜNG HỢP KO CÓ GÌ THÌ LẤY TẤT
                {
                    lst_data = _ObjBL.Contract_Search_ThanhKhoan("", DateTime.MinValue, Convert.ToInt16(NaviCommon.Enum_Contract_Status.Da_Duyet),
                                                                 currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                                                 Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                                 p_orderby + " " + p_ordertype, p_start, p_end, ref p_totalrecord);
                }
                ViewBag.Paging       = HtmlControllHelpers.PagingData(p_currentpage, Common.cNumberRecordOnPage, p_totalrecord);
                ViewBag.RecordOnPage = Common.cNumberRecordOnPage;
                ViewBag.IsSearch     = p_issearch;
                ViewBag.List         = lst_data;
                return(PartialView("ListDataTable"));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(PartialView("ListDataTable"));
            }
        }
コード例 #12
0
ファイル: ContractController.cs プロジェクト: dangtq72/ATT
        public ActionResult Contract_Update(decimal contractId)
        {
            var      contractBl = new ContractBL();
            Contract contract   = new Contract();

            try
            {
                contract = contractBl.GetById(contractId);
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
            }
            return(View("~/Areas/ModuleImport/Views/Contract/Contract_Update.cshtml"));
        }
コード例 #13
0
ファイル: ContractController.cs プロジェクト: dangtq72/ATT
        public ActionResult Contract_Update(Contract contract, List <Shipment> lstShipment)
        {
            var     contractBl = new ContractBL();
            decimal _success   = -1;

            try
            {
                _success = contractBl.Update_ContainShipment(contract, lstShipment);
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
            }
            return(Json(new { success = _success }));
        }
コード例 #14
0
 public ActionResult SaveEditData(Contracts_Info _ObjInfo)
 {
     try
     {
         ContractBL _ContractBL = new ContractBL();
         _ObjInfo.Modified_By   = SessionData.CurrentUser.User_Name;
         _ObjInfo.Modified_Date = NaviCommon.CommonFuc.CurrentDate();
         _ObjInfo.Due_Date      = _ObjInfo.Register_Date.AddDays((double)_ObjInfo.Period);
         bool _rel = _ContractBL.Contract_Update(_ObjInfo);
         return(Json(new { success = _rel }));
     }
     catch (Exception ex)
     {
         NaviCommon.Common.log.Error(ex.ToString());
         return(Json(new { success = false }));
     }
 }
コード例 #15
0
        public ActionResult ViewDetails(decimal p_id)
        {
            try
            {
                ContractBL     _ObjBL   = new ContractBL();
                Contracts_Info _objInfo = _ObjBL.Contract_GetById(p_id);
                //Declaration_BL _Declaration_BL = new Declaration_BL();

                //List<Declaration_Info> _lstDeclare = _Declaration_BL.Declaration_GetByContract(p_id);
                //ViewBag.LstDeclaration = _lstDeclare;

                return(PartialView("ViewDetails", _objInfo));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(View());
            }
        }
コード例 #16
0
        //
        // GET: /ModuleContracts/Contract/SaveAddData

        public ActionResult ContractList()
        {
            try
            {
                // test thử cái
                // abc
                // 123
                // 456
                string _url = Request.RawUrl;
                string _ok  = CommonFunc.Nvs_Redirect_QuyenTruyCapUser(_url);
                if (_ok != "")
                {
                    return(Redirect(_ok));
                }
                User_Info currentUser = (User_Info)SessionData.CurrentUser;

                int p_start = Common.cNumberRecordOnPage * (1 - 1) + 1;
                int p_end   = Common.cNumberRecordOnPage * 1;

                decimal Receive_Number = -1;
                decimal Receive_Year   = -1;
                decimal WareHouse_Id   = -1;
                decimal Business_Id    = -1;

                int p_totalrecord = 0;
                List <Contracts_Info> lst_data = new List <Contracts_Info>();
                ContractBL            _ObjBL   = new ContractBL();
                lst_data = _ObjBL.TableSearch("", DateTime.MinValue, -1, currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                              Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                              "CONTRACT_CODE ASC", p_start, p_end, ref p_totalrecord);
                ViewBag.Paging       = HtmlControllHelpers.PagingData(1, Common.cNumberRecordOnPage, p_totalrecord);
                ViewBag.RecordOnPage = Common.cNumberRecordOnPage;
                ViewBag.IsSearch     = 0;
                ViewBag.List         = lst_data;

                return(View());
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(View());
            }
        }
コード例 #17
0
ファイル: ContractController.cs プロジェクト: dangtq72/ATT
        public ActionResult Contract_Search(int currentPage, string keySearch)
        {
            var             contractBl  = new ContractBL();
            List <Contract> lstContract = new List <Contract>();

            try
            {
                decimal totalRecord = 0;
                lstContract = contractBl.Search(currentPage, ref totalRecord, keySearch);
                string htmlPaging = CommonFuc.Get_HtmlPaging <Contract>((int)totalRecord, currentPage, "hợp đồng");
                ViewBag.Paging       = htmlPaging;
                ViewBag.ListContract = lstContract;
                ViewBag.SumRecord    = totalRecord;
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
            }
            return(PartialView("~/Areas/Import/Views/Contract/_Partial_Contract_List.cshtml"));
        }
コード例 #18
0
ファイル: ContractController.cs プロジェクト: dangtq72/ATT
        public ActionResult Contract_Display()
        {
            var             contractBl  = new ContractBL();
            List <Contract> lstContract = new List <Contract>();

            try
            {
                decimal totalRecord = 0;
                lstContract = contractBl.Search(1, ref totalRecord);
                string htmlPaging = CommonFuc.Get_HtmlPaging <Contract>((int)totalRecord, 1, "hợp đồng");
                ViewBag.Paging       = htmlPaging;
                ViewBag.ListContract = lstContract;
                ViewBag.SumRecord    = totalRecord;
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
            }
            return(View("~/Areas/Import/Views/Contract/Contract_Display.cshtml"));
        }
コード例 #19
0
        //
        // GET: /ModuleDeclaration/Waiting/ListSearchImport_Datas

        public ActionResult Add()
        {
            try
            {
                string _url = Request.RawUrl;
                string _ok  = CommonFunc.Nvs_Redirect_QuyenTruyCapUser(_url);
                if (_ok != "")
                {
                    return(Redirect(_ok));
                }
                ContractBL            _ContractBL  = new ContractBL();
                List <Contracts_Info> ListContract = _ContractBL.Contract_GetByStatus((int)NaviCommon.Enum_Contract_Status.Da_Duyet);
                ViewBag.ListContract = ListContract;
                Product_BL          _Product_BL = new Product_BL();
                List <Product_Info> _lst_data   = _Product_BL.Product_GetAll();
                ViewBag.ListProduct = _lst_data;
                return(View());
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(View());
            }
        }
コード例 #20
0
        public ActionResult ListSearch_Datas(int p_issearch, string p_keysearch, string p_orderby, string p_ordertype, int p_currentpage)
        {
            try
            {
                User_Info currentUser = (User_Info)SessionData.CurrentUser;

                int p_start = Common.cNumberRecordOnPage * (p_currentpage - 1) + 1;
                int p_end   = Common.cNumberRecordOnPage * p_currentpage;

                string   _name          = "";
                DateTime _Register_Date = DateTime.MinValue;
                int      _Status        = -1;

                decimal Receive_Number = -1;
                decimal Receive_Year   = -1;
                decimal WareHouse_Id   = -1;
                decimal Business_Id    = -1;

                int p_totalrecord = 0;
                List <Contracts_Info> lst_data = new List <Contracts_Info>();
                ContractBL            _ObjBL   = new ContractBL();
                if (!string.IsNullOrEmpty(p_keysearch))
                {
                    string[] arr_keysearch = p_keysearch.Split('|');
                    if (arr_keysearch.Length == 7)
                    {
                        _name = arr_keysearch[0];
                        if (arr_keysearch[1] != "")
                        {
                            _Register_Date = Convert.ToDateTime(arr_keysearch[1]);
                        }
                        _Status = Convert.ToInt16(arr_keysearch[2]);

                        Receive_Number = string.IsNullOrEmpty(arr_keysearch[3]) ? -1 : Convert.ToDecimal(arr_keysearch[3]);
                        Receive_Year   = string.IsNullOrEmpty(arr_keysearch[4]) ? -1 : Convert.ToDecimal(arr_keysearch[4]);
                        WareHouse_Id   = Convert.ToDecimal(arr_keysearch[5]);
                        Business_Id    = Convert.ToDecimal(arr_keysearch[6]);

                        lst_data = _ObjBL.TableSearch(_name, _Register_Date, _Status,
                                                      currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                                      Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                      p_orderby + " " + p_ordertype, p_start, p_end, ref p_totalrecord);
                    }
                }
                else// TRƯỜNG HỢP KO CÓ GÌ THÌ LẤY TẤT
                {
                    lst_data = _ObjBL.TableSearch(_name, _Register_Date, _Status,
                                                  currentUser.User_Type, currentUser.User_Id.ToString(), currentUser.User_Name,
                                                  Receive_Number, Receive_Year, WareHouse_Id, Business_Id,
                                                  p_orderby + " " + p_ordertype, p_start, p_end, ref p_totalrecord);
                }
                ViewBag.Paging       = HtmlControllHelpers.PagingData(p_currentpage, Common.cNumberRecordOnPage, p_totalrecord);
                ViewBag.RecordOnPage = Common.cNumberRecordOnPage;
                ViewBag.IsSearch     = p_issearch;
                ViewBag.List         = lst_data;
                return(PartialView("PartialViewTableslistContract"));
            }
            catch (Exception ex)
            {
                NaviCommon.Common.log.Error(ex.ToString());
                return(PartialView("PartialViewTableslistContract"));
            }
        }
コード例 #21
0
        public void ThueXe(Manager manager)
        {
            Console.Clear();
            MotorBL mtbl = new MotorBL();
            bool    a    = false;
            bool    b    = false;

            Console.WriteLine("---------------------------------------------------");
            Console.WriteLine("--------------Thue xe----------");
            Console.WriteLine("--------------------------------------------------");
            ContractBL contractBL = new ContractBL();

            Contract contract = new Contract();

            Customers customer = new Customers();
            Motor     motor    = new Motor();

            customer = InputCustomerInfo();
            motor    = InputMotor();


            Menus menu = new Menus();


            List <Motor> listmotor = null;
            string       choice;

            while (b == false)
            {
                Console.WriteLine("Nhap bien so xe: ");
                contract.motor.LicensePlate = Console.ReadLine();
                try
                {
                    listmotor = mtbl.GetMotorByLicensePlates(contract.motor.LicensePlate);

                    foreach (var item in listmotor)
                    {
                        if (item.Motor_Status != "CHO THUE")
                        {
                            b = true;
                        }
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    b = false;
                }
                if (b == false)
                {
                    Console.WriteLine("Xe da duoc thue hoac khong ton tai.Ban co muon nhap lai (Y/N):");
                    while (true)
                    {
                        choice = Console.ReadLine().ToUpper();
                        if ((choice != "Y") && (choice != "N"))
                        {
                            Console.WriteLine("Ban chi duoc nhap Y/N. Moi nhap lai: ");
                            choice = Console.ReadLine().ToUpper();
                            continue;
                        }
                        break;
                    }
                    switch (choice)
                    {
                    case "Y":

                        continue;

                    case "y":
                        continue;

                    case "N":
                        menu.MenuManager(manager);
                        break;

                    case "n":
                        menu.MenuManager(manager);
                        break;

                    default:
                        continue;
                    }
                }
            }
            while (a == false)
            {
                Console.WriteLine("nhap ngay thue: ");
                contract.DateRental = Console.ReadLine();

                Console.WriteLine("Nhap ngay tra: ");
                contract.DateReturn = Console.ReadLine();

                Console.WriteLine("Kieu giao dich: ");
                while (true)
                {
                    contract.Type_Transaction = Console.ReadLine().ToUpper();
                    if (contract.Type_Transaction != "CHO THUE")
                    {
                        Console.WriteLine("Ban chi duoc nhap CHO THUE .Ban co muon nhap lai: (Y/N)?");

                        while (true)
                        {
                            choice = Console.ReadLine().ToUpper();
                            if ((choice != "Y") && (choice != "N"))
                            {
                                Console.WriteLine("Ban chi duoc nhap Y/N");
                                choice = Console.ReadLine().ToUpper();
                                continue;
                            }
                            break;
                        }
                        switch (choice)
                        {
                        case "Y":
                            continue;

                        case "y":
                            continue;

                        case "N":
                            menu.MenuManager(manager);
                            break;

                        case "n":
                            menu.MenuManager(manager);
                            break;

                        default:
                            continue;
                        }
                    }
                    break;
                }



                Console.WriteLine("Trang thai hop dong: ");
                contract.Contract_Status = Console.ReadLine().ToUpper();



                try
                {
                    contractBL.CreateContract(contract, customer);
                    a = true;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
                if (a == true)
                {
                    Console.WriteLine("THUE XE THANH CONG .");
                }
            }
        }