Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
 public void Delete(DN_Supplier obj)
 {
     FDIDB.DN_Supplier.Remove(obj);
 }
Ejemplo n.º 3
0
 public void Add(DN_Supplier obj)
 {
     FDIDB.DN_Supplier.Add(obj);
 }