public ActionResult Add(string key, Guid userId) { var model = new DN_Discount(); var msg = new JsonMessage(false, "Thêm mới dữ liệu thành công."); try { UpdateModel(model); model.IsShow = true; model.IsDeleted = false; model.UserCreate = userId; _da.Add(model); _da.Save(); } catch (Exception ex) { msg.Erros = true; msg.Message = "Dữ liệu chưa được thêm mới"; Log2File.LogExceptionToFile(ex); } return(Json(msg, JsonRequestBehavior.AllowGet)); }
public void Add(DN_Discount item) { FDIDB.DN_Discount.Add(item); }