public ActionResult Create(tblCustomerGroup obj, bool SaveAndCountinue = false)
        {
            //ViewBag
            ViewBag.DDLMenu = GetMenuList();

            if (!ModelState.IsValid)
            {
                return(View(obj));
            }

            obj.CustomerGroupID = Guid.NewGuid();

            //Thực hiện thêm mới
            var result = _tblCustomerGroupService.Create(obj);

            if (result.isSuccess)
            {
                WriteLog.Write(result, GetCurrentUser.GetUser(), obj.CustomerGroupID.ToString(), obj.CustomerGroupName, "tblCustomerGroup", ConstField.AccessControlCode, ActionConfigO.Create);

                if (SaveAndCountinue)
                {
                    TempData["Success"] = result.Message;
                    return(RedirectToAction("Create", new { selectedId = obj.CustomerGroupID, parentid = obj.ParentID }));
                }

                return(RedirectToAction("Index", new { selectedId = obj.CustomerGroupID }));
            }
            else
            {
                return(View(obj));
            }
        }
        public ActionResult Create(tblCustomerGroup obj, bool SaveAndCountinue = false)
        {
            //ViewBag
            ViewBag.DDLMenu = GetMenuList();

            if (!ModelState.IsValid)
            {
                return(View(obj));
            }

            if (string.IsNullOrWhiteSpace(obj.CustomerGroupName))
            {
                ModelState.AddModelError("CustomerGroupName", FunctionHelper.GetLocalizeDictionary("Home", "notification")["cusGrp_name"]);
                return(View(obj));
            }

            obj.CustomerGroupID = Guid.NewGuid();

            //Thực hiện thêm mới
            var result = _tblCustomerGroupService.Create(obj);

            if (result.isSuccess)
            {
                WriteLog.Write(result, GetCurrentUser.GetUser(), obj.CustomerGroupID.ToString(), obj.CustomerGroupName, "tblCustomerGroup", ConstField.ParkingCode, ActionConfigO.Create);

                if (SaveAndCountinue)
                {
                    TempData["Success"] = result.Message;
                    return(RedirectToAction("Create", new { selectedId = obj.CustomerGroupID, id = obj.CustomerGroupID }));
                }

                return(RedirectToAction("Index", new { selectedId = obj.CustomerGroupID }));
            }
            else
            {
                return(View(obj));
            }
        }