public ActionResult Add(string key, string codeLogin) { var model = new DN_ExportProduct(); try { if (key != Keyapi) { return(Json(0, JsonRequestBehavior.AllowGet)); } UpdateModel(model); model.Note = HttpUtility.UrlDecode(model.Note); var dateCreated = Request["DateCreated_"]; model.Export_Product = GetListExportItem(codeLogin); model.DateExport = dateCreated.StringToDate().TotalSeconds(); model.DateCreated = DateTime.Now.TotalSeconds(); model.AgencyId = Agencyid(); model.Code = DateTime.Now.ToString("yyMMddHHmm"); model.IsDeleted = false; _da.Add(model); _da.Save(); return(Json(model.ID, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(0, JsonRequestBehavior.AllowGet)); } }
public void Delete(DN_ExportProduct item) { FDIDB.DN_ExportProduct.Remove(item); }
public void Add(DN_ExportProduct item) { FDIDB.DN_ExportProduct.Add(item); }