public ActionResult Add(string key) { var model = new DN_Supplier(); try { if (key != Keyapi) { return(Json(0, JsonRequestBehavior.AllowGet)); } UpdateModel(model); model.IsDeleted = false; model.DateCreate = DateTime.Now.TotalSeconds(); model.Name = HttpUtility.UrlDecode(model.Name); model.Address = HttpUtility.UrlDecode(model.Address); model.Description = HttpUtility.UrlDecode(model.Description); model.Note = HttpUtility.UrlDecode(model.Note); _da.Add(model); _da.Save(); return(Json(1, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(0, JsonRequestBehavior.AllowGet)); } }