public ActionResult Edit([Bind(Include = "PdfID,status,File")] pdffile pdffile) { if (ModelState.IsValid) { db.Entry(pdffile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pdffile)); }
public ActionResult Edit([Bind(Include = "senior_id,Home_no,Education,Occupation,Contact_no,DOB,BirthPlace,CitizenShip_no,CitizenshipIssue_district,citizenissue_date,Name")] table_house_senior_details table_house_senior_details) { if (ModelState.IsValid) { db.Entry(table_house_senior_details).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(table_house_senior_details)); }
public ActionResult Edit([Bind(Include = "PBM_ID,Name,nata,gender,birth_place,education,age,age_group,PB_ID")] pariwar_bekti_bibarand_many pariwar_bekti_bibarand_many) { if (ModelState.IsValid) { db.Entry(pariwar_bekti_bibarand_many).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PB_ID = new SelectList(db.pariwar_bekti_bibarand, "PB_ID", "PB_ID", pariwar_bekti_bibarand_many.PB_ID); return(View(pariwar_bekti_bibarand_many)); }
public ActionResult Edit([Bind(Include = "sewaID,khop,mahila_posand,upachar,senior_id")] swosta_sewa swosta_sewa) { if (ModelState.IsValid) { db.Entry(swosta_sewa).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", swosta_sewa.senior_id); return(View(swosta_sewa)); }
public ActionResult Edit([Bind(Include = "F_id,House_type,House_area,House_total_area,roof_type,on_rent,cooking_type,entertainment,annual_income,sampannata_sthar,drinking_water,drinking_water_TYPE,fohormaila_bewasthapan,irrigation,irrigation_type,sadak_pugeko,sadak_type,bhukampa_jokhim,house_used_for,Ghar_naksha,storey,electricity,electricity_type,senior_id")] table_home_facility table_home_facility) { if (ModelState.IsValid) { db.Entry(table_home_facility).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_home_facility.senior_id); return(View(table_home_facility)); }
public ActionResult Edit([Bind(Include = "apangaID,apangata1,apanga_type,senior_id")] apangata apangata) { if (ModelState.IsValid) { db.Entry(apangata).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", apangata.senior_id); return(View(apangata)); }
public ActionResult Edit([Bind(Include = "D_id,Total_person,Male_count,Female_count,caste,religion,senior_id")] table_demographic table_demographic) { if (ModelState.IsValid) { db.Entry(table_demographic).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_demographic.senior_id); return(View(table_demographic)); }
public ActionResult Edit([Bind(Include = "ABM_ID,Name,Gender,Total,went_place,gone_reason,AB_ID")] anupasthit_bekti_many anupasthit_bekti_many) { if (ModelState.IsValid) { db.Entry(anupasthit_bekti_many).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AB_ID = new SelectList(db.anupasthit_bekti, "AB_ID", "senior_id", anupasthit_bekti_many.AB_ID); return(View(anupasthit_bekti_many)); }
public ActionResult Edit([Bind(Include = "Add_id,Oda_no,Sabik_gabisa,Sabik_Oda,Tole,senior_id")] table_address table_address) { if (ModelState.IsValid) { db.Entry(table_address).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_address.senior_id); return(View(table_address)); }
public ActionResult Create([Bind(Include = "Add_id,Oda_no,Sabik_gabisa,Sabik_Oda,Tole,senior_id")] table_address table_address) { if (ModelState.IsValid) { if (!db.table_address.Any(u => u.senior_id == table_address.senior_id)) { //db.table_address.Any(ag => ag.senior_id == c) db.table_address.Add(table_address); db.SaveChanges(); //db.pdffiles.Add(new pdffile // { // status = true //}); // db.SaveChanges(); //for status value change from var result = db.pdffiles // this explicit query is here .Where(stats => stats.status == false) .Take(1); foreach (var item in result) { ViewBag.file = item.File; pdffile pdff = new pdffile(); using (var con = new woda_testEntities()) { pdff = con.pdffiles.First(x => x.File == item.File); pdff.status = true; con.pdffiles.Attach(pdff); var entry = con.Entry(pdff); entry.Property(e => e.status).IsModified = true; con.SaveChanges(); } } //to here return(RedirectToAction("Index")); } else { ViewBag.error = "This Home Number already added"; } } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_address.senior_id); return(View(table_address)); }
public ActionResult Edit([Bind(Include = "AB_ID,senior_id")] anupasthit_bekti anupasthit_bekti) { if (ModelState.IsValid) { db.Entry(anupasthit_bekti).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Education", anupasthit_bekti.senior_id); return(View(anupasthit_bekti)); }
public ActionResult Edit([Bind(Include = "PB_ID,senior_id")] pariwar_bekti_bibarand pariwar_bekti_bibarand) { if (ModelState.IsValid) { db.Entry(pariwar_bekti_bibarand).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", pariwar_bekti_bibarand.senior_id); return(View(pariwar_bekti_bibarand)); }
public ActionResult Create([Bind(Include = "F_id,House_type,House_area,House_total_area,roof_type,on_rent,cooking_type,entertainment,annual_income,sampannata_sthar,drinking_water,drinking_water_TYPE,fohormaila_bewasthapan,irrigation,irrigation_type,sadak_pugeko,sadak_type,bhukampa_jokhim,house_used_for,Ghar_naksha,storey,electricity,electricity_type,senior_id")] table_home_facility table_home_facility) { if (ModelState.IsValid) { if (!db.table_home_facility.Any(u => u.senior_id == table_home_facility.senior_id)) { db.table_home_facility.Add(table_home_facility); db.SaveChanges(); //update status value var result = db.pdffiles // this explicit query is here .Where(stats => stats.home_status == false) .Take(1); foreach (var item in result) { ViewBag.file = item.File; pdffile pdff = new pdffile(); using (var con = new woda_testEntities()) { pdff = con.pdffiles.First(x => x.File == item.File); pdff.home_status = true; con.pdffiles.Attach(pdff); var entry = con.Entry(pdff); entry.Property(e => e.home_status).IsModified = true; con.SaveChanges(); } } return(RedirectToAction("Index")); } else { ViewBag.error = "This Home Number already added"; } } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_home_facility.senior_id); return(View(table_home_facility)); }
public ActionResult Create([Bind(Include = "D_id,Total_person,Male_count,Female_count,caste,religion,senior_id")] table_demographic table_demographic) { if (ModelState.IsValid) { if (!db.table_demographic.Any(u => u.senior_id == table_demographic.senior_id)) { db.table_demographic.Add(table_demographic); db.SaveChanges(); //update status value var result = db.pdffiles // this explicit query is here .Where(stats => stats.demo_status == false) .Take(1); foreach (var item in result) { ViewBag.file = item.File; pdffile pdff = new pdffile(); using (var con = new woda_testEntities()) { pdff = con.pdffiles.First(x => x.File == item.File); pdff.demo_status = true; con.pdffiles.Attach(pdff); var entry = con.Entry(pdff); entry.Property(e => e.demo_status).IsModified = true; con.SaveChanges(); } } return(RedirectToAction("Index")); } else { ViewBag.error = "This Home Number already added"; } } ViewBag.senior_id = new SelectList(db.table_house_senior_details, "senior_id", "Home_no", table_demographic.senior_id); return(View(table_demographic)); }
public ActionResult Create([Bind(Include = "senior_id,Home_no,Education,Occupation,Contact_no,DOB,BirthPlace,CitizenShip_no,CitizenshipIssue_district,citizenissue_date,Name")] table_house_senior_details table_house_senior_details) { if (ModelState.IsValid) { if (!db.table_house_senior_details.Any(u => u.Home_no == table_house_senior_details.Home_no)) { db.table_house_senior_details.Add(table_house_senior_details); db.SaveChanges(); var result = db.pdffiles // this explicit query is here .Where(stats => stats.senior_status == false) .Take(1); foreach (var item in result) { ViewBag.file = item.File; pdffile pdff = new pdffile(); using (var con = new woda_testEntities()) { pdff = con.pdffiles.First(x => x.File == item.File); pdff.senior_status = true; con.pdffiles.Attach(pdff); var entry = con.Entry(pdff); entry.Property(e => e.senior_status).IsModified = true; con.SaveChanges(); } } return(RedirectToAction("Index")); } else { ViewBag.error = "This Home Number already added"; } } return(View(table_house_senior_details)); }