public ActionResult Create3(PromotionViewModel model, List <PromotionItemFileViewModel> fileModel) { UserViewModel model2 = PromotionRepo.GetIdByName(User.Identity.Name); model.Create_By = User.Identity.Name; model.Request_By = model2.M_Employee_Id; ResultResponse result = PromotionRepo.UpdateCreate3(model, fileModel, model.Id); return(Json(new { success = result.Success, entity = model, message = result.Message }, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(PromotionViewModel model, List <PromotionItemViewModel> itemModel, List <PromotionItemFileViewModel> fileModel) { model.Update_By = User.Identity.Name; if (model.Flag_Design == "1") { ResultResponse result = PromotionRepo.Update(model, itemModel, fileModel); return(Json(new { success = result.Success, entity = model, message = result.Message }, JsonRequestBehavior.AllowGet)); } else { ResultResponse result2 = PromotionRepo.UpdateCreate3(model, fileModel, model.Id); return(Json(new { success = result2.Success, entity = model, message = result2.Message }, JsonRequestBehavior.AllowGet)); } }