public ActionResult Create(MstWilayahModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    var Dto = Mapper.Map <MstWilayahDto>(model);

                    Dto.CREATED_BY   = CurrentUser.USERNAME;
                    Dto.CREATED_DATE = DateTime.Now;
                    Dto.STATUS       = true;

                    _mstWilayahBLL.Save(Dto, Mapper.Map <LoginDto>(CurrentUser));
                    return(RedirectToAction("Index", "MstWilayah"));
                }
                catch (Exception)
                {
                    throw;
                }
            }
            else
            {
                model = Init(model);
                return(View(model));
            }
        }
        public MstWilayahModel Init(MstWilayahModel model)
        {
            model.CurrentUser    = CurrentUser;
            model.Menu           = "Wilayah";
            model.ChangesHistory = GetChangesHistory((int)Enums.MenuList.MasterWilayah, model.ID);

            return(model);
        }
        public ActionResult Create()
        {
            var model = new MstWilayahModel();

            model        = Init(model);
            model.STATUS = true;

            return(View(model));
        }
        public ActionResult Edit(int?id)
        {
            if (!id.HasValue)
            {
                return(HttpNotFound());
            }

            var model = new MstWilayahModel();

            var GetData = _mstWilayahBLL.GetById(id);

            if (GetData == null)
            {
                return(HttpNotFound());
            }

            model = Mapper.Map <MstWilayahModel>(GetData);
            model = Init(model);

            return(View(model));
        }