public ActionResult Create(Navigation pNewNavigation,string Lang)
 {
     try
     {
         // TODO: Add insert logic here
         if (Lang == "Tiếng Việt")
         {
             pNewNavigation.LangId = 0;
         }
         else
         {
             pNewNavigation.LangId = 1;
         }
         pNewNavigation.CreatedBy = account.Id;
         pNewNavigation.CreatedDate = DateTime.Now;
         pNewNavigation.EditBy = account.Id;
         pNewNavigation.EditDate = DateTime.Now;
         pNewNavigation.IsActive = true;
         var check = new NavigationModel().Create(pNewNavigation);
         if (!check)
         {
             return View(pNewNavigation);
         }
         return RedirectToAction("Index");
     }
     catch
     {
         return View(pNewNavigation);
     }
 }
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here
                var check = new NavigationModel().Delete(id);
                if (check == true)
                    return RedirectToAction("Index");
                else
                    return View(new NavigationModel().GetNavigationById(id));

            }
            catch
            {
                return View(new NavigationModel().GetNavigationById(id));
            }
        }
 public ActionResult Details(int id)
 {
     var Result = new NavigationModel().GetNavigationById(id);
     return View(Result);
 }
 public ActionResult Edit(int id, Navigation pNewNavigation, string Lang)
 {
     try
     {
         // TODO: Add update logic here
         if (Lang == "Tiếng Việt")
         {
             pNewNavigation.LangId = 0;
         }
         else
         {
             pNewNavigation.LangId = 1;
         }
         pNewNavigation.CreatedBy = account.Id;
         pNewNavigation.CreatedDate = DateTime.Now;
         pNewNavigation.EditBy = account.Id;
         pNewNavigation.EditDate = DateTime.Now;
         var check = new NavigationModel().Edit(id, pNewNavigation);
         if (!check)
         {
             return View(pNewNavigation);
         }
         return RedirectToAction("Index");
     }
     catch
     {
         return View(new NavigationModel().GetNavigationById(id));
     }
 }