public ActionResult Save(StoreSupplier s) { bool success = false; string message = ""; if (s.Supplier_Id == 0) { if (s.AddSupplier()) { success = true; message = "Supplier Added Successfully"; } else { success = false; message = "Supplier Adding Failed Details Might be duplicated"; } } else { if (s.UpdateSupplier()) { success = true; message = "Supplier Updated Successfully"; } else { success = false; message = "Supplier Updation Failed Details Might be duplicated"; } } return(Json(new { success = success, message = message }, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(decimal id) { StoreSupplier s = new StoreSupplier(); s = s.GetSuppliers() .Where(x => x.Supplier_Id == id).ToList()[0]; return(View("New", s)); }
public ActionResult SupplierSearch(string query) { StoreSupplier menu = new StoreSupplier(); List <StoreSupplier> StoreSupplierList = menu.GetSuppliers(); if (!String.IsNullOrWhiteSpace(query)) { StoreSupplierList = StoreSupplierList.Where(m => m.Name.ToLower().Contains(query)).ToList(); } return(Json(StoreSupplierList, JsonRequestBehavior.AllowGet)); }
public ActionResult Delete(int id) { bool success = false; string message = ""; StoreSupplier s = new StoreSupplier(); if (s.DeleteSupplier(id)) { success = true; message = "Supplier Delete Successfully"; } else { success = false; message = "Supplier Deletion Failed"; } return(Json(new { success = success, message = message }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Protected constructor with store supplier /// </summary> /// <param name="storeSupplier">Supplier use to build the state store</param> protected Materialized(StoreSupplier <S> storeSupplier) : this(null, storeSupplier) { }
/// <summary> /// Protected constructor with state store name and supplier /// </summary> /// <param name="name">State store name for query it</param> /// <param name="supplier">Supplier use to build the state store</param> protected InMemoryWindows(string name, StoreSupplier <WindowStore <Bytes, byte[]> > supplier) : base(name, supplier) { }
/// <summary> /// Protected constructor with state store name and supplier /// </summary> /// <param name="name">State store name for query it</param> /// <param name="supplier">Supplier use to build the state store</param> protected InMemory(string name, StoreSupplier <IKeyValueStore <Bytes, byte[]> > supplier) : base(name, supplier) { }
/// <summary> /// Protected constructor with state store name and supplier /// </summary> /// <param name="storeName">State store name for query it</param> /// <param name="storeSupplier">Supplier use to build the state store</param> protected Materialized(string storeName, StoreSupplier <S> storeSupplier) { this.storeName = storeName; StoreSupplier = storeSupplier; retention = TimeSpan.FromDays(1); }
// GET: StoreSupplier public ActionResult Index() { StoreSupplier s = new StoreSupplier(); return(View(s.GetSuppliers())); }
/// <summary> /// Protected constructor with store supplier /// </summary> /// <param name="storeSupplier">Supplier use to build the state store</param> protected Materialized(StoreSupplier <S> storeSupplier) { this.StoreSupplier = storeSupplier; }
/// <summary> /// Protected constructor with state store name and supplier /// </summary> /// <param name="storeName">State store name for query it</param> /// <param name="storeSupplier">Supplier use to build the state store</param> protected Materialized(string storeName, StoreSupplier <S> storeSupplier) { this.storeName = storeName; this.StoreSupplier = storeSupplier; }