예제 #1
0
        public ActionResult Create(MstBarangJadiModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    var Dto = Mapper.Map <MstBarangJadiDto>(model);

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

                    _mstBarangJadiBLL.Save(Dto, Mapper.Map <LoginDto>(CurrentUser));
                    return(RedirectToAction("Index", "MstBarangJadi"));
                }
                catch (Exception)
                {
                    throw;
                }
            }
            else
            {
                model = Init(model);
                return(View(model));
            }
        }