public ActionResult Edit(ChinhanhHoadondientu entity)
        {
            //try
            //{
            if (entity.machinhanh == null)
            {
                return(NotFound());
            }
            if (ModelState.IsValid)
            {
                int result = _hoadondientuRepository.capnhatChinhanhHoadondientu(entity);
                if (result > 0)
                {
                    SetAlert("Cập nhật thông tin chi nhánh thành công", "success");
                }
                else
                {
                    SetAlert("Cập nhật thông tin chi nhánh không thành công", "error");
                }
            }

            return(Redirect(HttpContext.Session.GetString("urlEditHoadondt")));
            //}
            //catch
            //{
            //    return View();
            //}
        }
 public ActionResult Create(ChinhanhHoadondientu entity)
 {
     if (ModelState.IsValid)
     {
         int result = _hoadondientuRepository.themChinhanhHoadondientu(entity);
         if (result > 0)
         {
             SetAlert("Thêm chi nhánh thành công", "success");
         }
         else
         {
             SetAlert("Thêm chi nhánh không thành công", "error");
         }
     }
     return(RedirectToAction(nameof(Index)));
 }