public ActionResult Add(string key, int agencyId) { var model = new Customer_question(); var msg = new JsonMessage(false, "Thêm mới dữ liệu thành công."); try { UpdateModel(model); model.IsDelete = false; model.AgencyID = agencyId; _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(Customer_question item) { FDIDB.Customer_question.Add(item); }