public ActionResult DeleteConfirmed(int id) { ct_client ct_client = db.ct_client.Find(id); ct_client.ct_status = WebConstants.cStatusNo; db.Entry(ct_client).State = EntityState.Modified; //db.ct_client.Remove(ct_client); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ct_client_id,ct_client_source,us_user_name,ct_create_time,ct_client_name,ct_status,ct_client_tel,ct_client_qq,ct_wedding_day,ct_reach_status,ct_order_status,ct_express,ct_freight,ct_address,ct_remark")] ct_client ct_client) { if (ModelState.IsValid) { db.Entry(ct_client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ct_client)); }
public ActionResult Create([Bind(Include = "ct_client_id,ct_client_source,us_user_name,ct_create_time,ct_client_name,ct_status,ct_client_tel,ct_client_qq,ct_wedding_day,ct_reach_status,ct_order_status,ct_express,ct_freight,ct_address,ct_remark")] ct_client ct_client) { if (ModelState.IsValid) { db.ct_client.Add(ct_client); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Source = OptionsProvider.PopulateClientSourceOption(false); return(View(ct_client)); }
// GET: /Client/Create public ActionResult Create() { ViewBag.Source = OptionsProvider.PopulateClientSourceOption(false); ct_client client = new ct_client(); client.us_user_name = "admin"; client.ct_status = WebConstants.cStatusYes; client.ct_create_time = DateTime.Now; return(View(client)); }
// GET: /Client/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ct_client ct_client = db.ct_client.Find(id); if (ct_client == null) { return(HttpNotFound()); } return(View(ct_client)); }
// GET: /Client/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ct_client ct_client = db.ct_client.Find(id); if (ct_client == null) { return(HttpNotFound()); } else { ViewBag.Source = OptionsProvider.PopulateClientSourceOption(false); } return(View(ct_client)); }
// GET: /Order/Create public ActionResult Create() { ViewBag.Source = OptionsProvider.PopulateClientSourceOption(false); ct_client client = new ct_client(); client.ct_client_id = 0; client.ct_status = WebConstants.cStatusYes; client.us_user_name = "admin"; client.ct_create_time = DateTime.Now; client.ct_reach_status = WebConstants.cClientReachStatusR; client.ct_order_status = WebConstants.cClientOrderStatusO; or_order order = new or_order(); order.or_status = WebConstants.cStatusYes; order.or_from = "城西"; order.ct_client = client; return(View(order)); }