public IHttpActionResult PutAdmin(int id, Admin admin) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != admin.AdminID) { return(BadRequest()); } db.Entry(admin).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!AdminExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public ActionResult Edit([Bind(Include = "modify_consumerID,inword_no,modification_status,consumer_no,previous_name,previous_surname,previous_cnic,previous_mobile,previous_address,new_name,new_surname,new_cnic,new_mobile,new_address,createdby,createdon,description,approvedby,status")] modify_consumer modify_consumer) { if (ModelState.IsValid) { db.Entry(modify_consumer).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(modify_consumer); }
public ActionResult Edit([Bind(Include = "sno,inword,consumer_no,emp_id,consumer_name,consumer_fname,consumer_cnic,consumer_mobile,consumer_address,category,area,outstanding_Arrears,after_rebate,description,createdby,createdon,status")] kmc_emp_rebate kmc_emp_rebate) { if (ModelState.IsValid) { db.Entry(kmc_emp_rebate).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kmc_emp_rebate)); }
public ActionResult Edit([Bind(Include = "sno,consumer_no,consumer_code,consumer_name,consumer_address,category,area,sqft_sqyd,Storey,zone,town,uc_no,uc_name,block,issue_date,due_date,billing_month,current_Charges,outstanding_Arrears,current_arrears,consumer_service_charges,within_duedate_amount,consumer_surcharge,after_duedate_amount,property_tag,kmc_category,createdby,createdon,status,consumer_checkdigit,billing_period_code,barcode,checkdigit_status,part_payment_createdon,part_payment_createdby,part_payment_arrears,part_payment_into,rebate_status,short_description,Department_Arrears,Arrears_15")] invoice invoice) { if (ModelState.IsValid) { db.Entry(invoice).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(invoice)); }
public ActionResult Edit([Bind(Include = "MUCTBillID,ConsumerNo,Zone,Town,Employee,Createdon,createdby")] MUCTBill_Records mUCTBill_Records) { if (ModelState.IsValid) { db.Entry(mUCTBill_Records).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mUCTBill_Records)); }
public ActionResult Edit([Bind(Include = "RCID,inwordno,consumer_no,consumer_name,pervious_outstanding,after_rebate_outstanding,difference,difference_percentage,cancledby,cancledon")] Rebate_cancle_history rebate_cancle_history) { if (ModelState.IsValid) { db.Entry(rebate_cancle_history).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rebate_cancle_history)); }
public ActionResult Edit([Bind(Include = "sno,inword,modification_status,consumer_no,previous_category,previous_area,previous_Storey,previous_current_Charges,previous_outstanding_Arrears,new_category,new_area,new_storey,new_current_Charge,new_outstanding_Arrears,zone,town,billing_month,consumer_surcharge,createdby,createdon,description,status")] modify_invoice modify_invoice) { if (ModelState.IsValid) { db.Entry(modify_invoice).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(modify_invoice)); }
public ActionResult Create([Bind(Include = "userinfoID,Username,FullName,Password,Mobile,Email,CNIC,Address,RoleID,AccountStatusID")] userinfo userinfo) { if (!ModelState.IsValid) { db.userinfoes.Add(userinfo); //db.Entry(userinfo).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } else if (ModelState.IsValid) { db.userinfoes.Add(userinfo); db.Entry(userinfo).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userinfo)); }
public ActionResult Edit([Bind(Include = "sno,consumer_no,consumer_code,consumer_name,consumer_address,category,area,issue_date,due_date,billing_month,part_payment_into,current_Charges,outstanding_Arrears,part_payemnt_arrears,createdby,createdon,status,barcode")] partPayment partPayment) { if (ModelState.IsValid) { db.Entry(partPayment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(partPayment)); }
public ActionResult Edit([Bind(Include = "propertyTypeID,propertyTypeName,PropertyCode,SizeIn")] propertytype propertytype) { if (ModelState.IsValid) { db.Entry(propertytype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(propertytype)); }
public ActionResult Edit([Bind(Include = "SSID,InwordNo,Consumer_No,Department,Zone,Twon,Createdon,Createdby")] searchinsheetsuspended searchinsheetsuspended) { if (ModelState.IsValid) { db.Entry(searchinsheetsuspended).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(searchinsheetsuspended)); }
public ActionResult Edit([Bind(Include = "impactID,inword,modification_status,consumer_no,consumer_name,previous_arrears,after_correction,difference,difference_percentage,impact,Description,createdon,createdby,status")] modify_impact modify_impact) { if (ModelState.IsValid) { db.Entry(modify_impact).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(modify_impact)); }
public ActionResult Edit([Bind(Include = "SearchID,inword,consumer_no,zone,Createdby,createdon")] searchingsheet searchingsheet) { if (ModelState.IsValid) { db.Entry(searchingsheet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(searchingsheet)); }
public ActionResult Edit([Bind(Include = "SubCategoryID,SubCategoryName,subcategorycode,PropertyTypeID,Status")] subcategoryproperty subcategoryproperty) { if (ModelState.IsValid) { db.Entry(subcategoryproperty).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(subcategoryproperty)); }
public bool UpdateAdmin(Admin ad) { using (AdminEntities db = new AdminEntities()) { db.Admins.Attach(ad); db.Entry(ad).State = System.Data.Entity.EntityState.Modified; int row = db.SaveChanges(); return(row > 0); } }
public ActionResult Edit([Bind(Include = "muctempid,employee,designation")] muctemployee muctemployee) { if (ModelState.IsValid) { db.Entry(muctemployee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(muctemployee)); }
public ActionResult Edit([Bind(Include = "ZoneID,ZoneName,Status")] zone zone) { if (ModelState.IsValid) { zone.Status = 1; db.Entry(zone).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(zone)); }
public ActionResult Edit([Bind(Include = "TownID,TownName,AccountStatusID,ZoneId")] town town) { if (ModelState.IsValid) { using (db = new AdminEntities()) { town.AccountStatusID = 1; db.Entry(town).State = EntityState.Modified; db.SaveChanges(); } return(RedirectToAction("Index")); } ViewBag.ZoneId = new SelectList(db.zones, "ZoneID", "ZoneName", town.ZoneId); return(View(town)); }