public int AddStore(Store store, aspnet_User user) { store.UserID = user.UserId; webstoredata.Stores.InsertOnSubmit(store); webstoredata.SubmitChanges(); return store.StoreID; }
public Store UpdateStore(Store store) { Store updatedStore = GetStore(store.StoreID); updatedStore.StoreAddress = store.StoreAddress; updatedStore.StoreCity = store.StoreCity; updatedStore.StoreEmail = store.StoreEmail; updatedStore.StoreName = store.StoreName; updatedStore.StorePhone = store.StorePhone; updatedStore.StoreState = store.StoreState; updatedStore.StoreZip = store.StoreZip; webdata.SubmitChanges(); return updatedStore; }
partial void DeleteStore(Store instance);
partial void UpdateStore(Store instance);
partial void InsertStore(Store instance);
public ActionResult Update(Store store) { storemodel.UpdateStore(store); return View(store); }
public ActionResult Create(Store store) { aspnet_User user = data.GetCurrentUser(); data.AddStore(store, user); return View("CreateSuccess", store); }