示例#1
0
        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));
            }
        }
示例#2
0
 public void Delete(DN_ExportProduct item)
 {
     FDIDB.DN_ExportProduct.Remove(item);
 }
示例#3
0
 public void Add(DN_ExportProduct item)
 {
     FDIDB.DN_ExportProduct.Add(item);
 }