public ActionResult Edit([Bind(Include = "Service_id,Service_name,Service_photo_url,Description")] Service service) { if (ModelState.IsValid) { db.Entry(service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(service)); }
public ActionResult Edit([Bind(Include = "Coupon_id,Coupon_name,Discount")] Coupon coupon) { if (ModelState.IsValid) { db.Entry(coupon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(coupon)); }
public ActionResult Edit([Bind(Include = "Payway_id,Name")] Payway payway) { if (ModelState.IsValid) { db.Entry(payway).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(payway)); }
public ActionResult Edit([Bind(Include = "Service_details_Id,Type_id,Name,Work_duration,Price,Discount_price,Description,Warranty_period,Photo,Unit")] Service_details service_details) { if (ModelState.IsValid) { db.Entry(service_details).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Type_id = new SelectList(db.Service_types, "Type_id", "Type_name", service_details.Type_id); return(View(service_details)); }
public ActionResult Edit([Bind(Include = "Type_id,Type_name,Type_description,Service_id")] Service_types service_types) { if (ModelState.IsValid) { db.Entry(service_types).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", service_types.Service_id); return(View(service_types)); }
public ActionResult Edit([Bind(Include = "Order_detail_no,Order_id,Service_details_Id,Appointment_date,Session_id,Designer_id,Coupon_id,Last_updata_date")] Order_details order_details) { if (ModelState.IsValid) { db.Entry(order_details).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Order_id = new SelectList(db.Order, "Order_id", "Order_id", order_details.Order_id); ViewBag.Service_details_Id = new SelectList(db.Service_details, "Service_details_Id", "Name", order_details.Service_details_Id); return(View(order_details)); }
public ActionResult Edit([Bind(Include = "Order_id,Order_date,Cust_id,Payway_id,Last_updata_date")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Cust_id = new SelectList(db.Customer, "Cust_id", "Account", order.Cust_id); ViewBag.Payway_id = new SelectList(db.Payway, "Payway_id", "Name", order.Payway_id); return(View(order)); }
public ActionResult Edit([Bind(Include = "Protfolio_id,Designer_id,Service_details_Id,Photo_url,Year,Month,Color_type,Description,Create_date,Last_updata_date")] Protfolio protfolio) { if (ModelState.IsValid) { db.Entry(protfolio).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Designer_id = new SelectList(db.Designer, "Designer_id", "Name", protfolio.Designer_id); ViewBag.Service_details_Id = new SelectList(db.Service_details, "Service_details_Id", "Name", protfolio.Service_details_Id); return(View(protfolio)); }
public ActionResult Edit([Bind(Include = "Cust_id,Coupon_id,End_day,Start_day")] Customer_coupon customer_coupon) { if (ModelState.IsValid) { db.Entry(customer_coupon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Coupon_id = new SelectList(db.Coupon, "Coupon_id", "Coupon_name", customer_coupon.Coupon_id); ViewBag.Cust_id = new SelectList(db.Customer, "Cust_id", "Account", customer_coupon.Cust_id); return(View(customer_coupon)); }
public ActionResult Edit([Bind(Include = "Designer_id,Last_updata_date,Service_details_Id,Service_type_id,Service_id")] Designer_service designer_service) { if (ModelState.IsValid) { db.Entry(designer_service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Designer_id = new SelectList(db.Designer, "Designer_id", "Account", designer_service.Designer_id); ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", designer_service.Service_id); ViewBag.Service_details_Id = new SelectList(db.Service_details, "Service_details_Id", "Name", designer_service.Service_details_Id); ViewBag.Service_type_id = new SelectList(db.Service_types, "Type_id", "Type_name", designer_service.Service_type_id); return(View(designer_service)); }
public void Create(T entity) { _context.Entry(entity).State = EntityState.Added; }