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

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

                    _mstBahanBakuBLL.Save(Dto, Mapper.Map <LoginDto>(CurrentUser));
                    return(RedirectToAction("Index", "MstBahanBaku"));
                }
                catch (Exception)
                {
                    throw;
                }
            }
            else
            {
                model = Init(model);
                return(View(model));
            }
        }
        public ActionResult Create()
        {
            var model = new MstBahanBakuModel();

            model = Init(model);

            return(View(model));
        }
        public MstBahanBakuModel Init(MstBahanBakuModel model)
        {
            model.MainMenu    = Enums.MenuList.GdgBarangBB;
            model.Menu        = "Master Bahan Baku";
            model.CurrentUser = CurrentUser;

            return(model);
        }
        public ActionResult Edit(int Id)
        {
            var model = new MstBahanBakuModel();

            model = Mapper.Map <MstBahanBakuModel>(_mstBahanBakuBLL.GetById(Id));
            model = Init(model);

            return(View(model));
        }
 public ActionResult Edit(MstBahanBakuModel model)
 {
     return(View(model));
 }