Example #1
0
        public JsonResult DeleteSupplier(int Id)
        {
            bool result = false;
            var  charts = data.SearchDevice(null, null, null, null, null).Where(x => x.SupplierId == Id).ToList();

            if (charts.Count == 0)
            {
                data.DeleteSupplier(Id);
                result = true;
            }
            else
            {
                result = false;
            }
            return(Json(result, JsonRequestBehavior.AllowGet));
        }