public void Show_History_Xe()
        {
            Login();

            driver.Navigate().GoToUrl(homeURL + "/app/admin/ntx-list");
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(7);
            Thread.Sleep(8000);

            //Act;
            IWebElement         ele      = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/div/div[3]/div/div/div/div/div/p-table/div/div/div/div[2]/table/tbody/tr[1]"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("arguments[0].click();", ele);
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(7);

            driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/div/div[1]/ul/li[4]")).Click();
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

            wait.Until(e => e.FindElement(By.Id("ntx_name")).GetAttribute("value") != "");

            //Check with value of DB
            //get id xe
            String          ntxCode = driver.FindElement(By.Id("ntx_code")).GetAttribute("value");
            NguoiThueXe_DTO ntx     = DataProvider.Instance.GetData <NguoiThueXe_DTO>("NguoiThueXe_Search", new { NTX_CODE = ntxCode, RECORD_STATUS = "1" }).ToList().FirstOrDefault();

            var list       = DataProvider.Instance.GetData <Xe_DTO>("XE_ByNTX_ID", new { NTX_ID = ntx.NTX_ID }).ToList();
            var totalCount = list.Count();

            var text = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/div/div[2]/div[3]/div[2]/span")).Text;

            //Assert
            Assert.AreEqual(text, "Tổng cộng: " + totalCount);

            driver.Close();
        }
        public void Show_History_NTX()
        {
            Login();

            driver.Navigate().GoToUrl(homeURL + "/app/admin/xe-group11");
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(7);
            Thread.Sleep(8000);

            //Act;
            IWebElement         ele      = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/div[3]/div/div/div/div/div/p-table/div/div/div/div[2]/table/tbody/tr[1]"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("arguments[0].click();", ele);
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(7);

            driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/div[1]/ul/li[3]")).Click();
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

            wait.Until(e => e.FindElement(By.Name("xE_CODE")).GetAttribute("value") != "");

            //Check with value of DB
            //get id xe
            String        xeCode = driver.FindElement(By.Name("xE_CODE")).GetAttribute("value");
            List <Xe_DTO> xe     = DataProvider.Instance.GetData <Xe_DTO>("XE_GETBYCODE", new Xe_DTO
            {
                XE_CODE = xeCode
            });
            var             list       = DataProvider.Instance.GetData <NguoiThueXe_DTO>("NguoiThueXe_ByXeID", new { XE_ID = xe.ElementAt(0).XE_ID }).ToList();
            var             totalCount = list.Count();
            NguoiThueXe_DTO currentNTX = DataProvider.Instance.GetData <NguoiThueXe_DTO>("NguoiThueXe_ByXeId_HienTai", new { XE_ID = xe.ElementAt(0).XE_ID }).ToList().FirstOrDefault();

            var text            = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/form/div/div[5]/div[3]/div/div/div/span")).Text;
            var currentNTX_name = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/form/div/div[5]/div[2]/div/div/div[1]/input")).GetAttribute("value");
            var currentNTX_code = driver.FindElement(By.XPath("/html/body/app-root/ng-component/div/div/div[2]/ng-component/form/div/div[5]/div[2]/div/div/div[2]/input")).GetAttribute("value");

            //Assert
            Assert.AreEqual(text, "Tổng cộng: " + totalCount);
            if (currentNTX == null)
            {
                Assert.AreEqual(currentNTX_name, "Trống");
                Assert.AreEqual(currentNTX_code, "Trống");
            }
            else
            {
                Assert.AreEqual(currentNTX_name, currentNTX.NTX_NAME);
                Assert.AreEqual(currentNTX_code, currentNTX.NTX_CODE);
            }

            driver.Close();
        }
        public PagedResultDto <NguoiThueXe_DTO> NguoiThueXe_Search(NguoiThueXe_DTO filterInput)
        {
            if (filterInput.RECORD_STATUS == null)
            {
                filterInput.RECORD_STATUS = "1";
            }
            var list       = procedureHelper.GetData <NguoiThueXe_DTO>("NguoiThueXe_Search", filterInput).ToList();
            var totalCount = list.Count();


            return(new PagedResultDto <NguoiThueXe_DTO>(
                       totalCount,
                       list
                       ));
        }
 public IDictionary <string, object> NguoiThueXe_Update(NguoiThueXe_DTO input)
 {
     return(procedureHelper.GetData <dynamic>("NguoiThueXe_Update", input).FirstOrDefault());
 }
 public IDictionary <string, object> NguoiThueXe_Insert(NguoiThueXe_DTO input)
 {
     input.RECORD_STATUS = "1";
     return(procedureHelper.GetData <dynamic>("NguoiThueXe_Insert", input).FirstOrDefault());
 }
 public PagedResultDto <NguoiThueXe_DTO> NguoiThueXe_Search([FromBody] NguoiThueXe_DTO filterInput)
 {
     return(NTXAppService.NguoiThueXe_Search(filterInput));
 }
 public IDictionary <string, object> NguoiThueXe_Update([FromBody] NguoiThueXe_DTO input)
 {
     return(NTXAppService.NguoiThueXe_Update(input));
 }