public ActionResult Edit(Int32 Proposalcheckpitchedroofid)
 {
     using (proposalchecklistpitchedroofCtl db = new proposalchecklistpitchedroofCtl()){
         proposalchecklistpitchedroofClass obj_proposalchecklistpitchedroof = db.selectById(Proposalcheckpitchedroofid);
         Session["EditPreviousURL"] = Convert.ToString(ControllerContext.HttpContext.Request.UrlReferrer);
         return(View(obj_proposalchecklistpitchedroof));
     }
 }
 public ActionResult Details(Int32 Proposalcheckpitchedroofid)
 {
     using (proposalchecklistpitchedroofCtl db = new proposalchecklistpitchedroofCtl()){ proposalchecklistpitchedroofClass obj_proposalchecklistpitchedroof = db.selectById(Proposalcheckpitchedroofid);
                                                                                         return(View(obj_proposalchecklistpitchedroof)); }
 }
 public ActionResult SaveRecords(FormCollection model)
 {
     if (ModelState.IsValid)
     {
         using (proposalchecklistpitchedroofCtl db = new proposalchecklistpitchedroofCtl()){
             var ProposalcheckpitchedroofidArray = model.GetValues("item.Proposalcheckpitchedroofid");
             var BuildingidArray        = model.GetValues("item.Buildingid");
             var IceandwatershieldArray = model.GetValues("item.Iceandwatershield");
             var DeckArray               = model.GetValues("item.Deck");
             var NoofdrainsArray         = model.GetValues("item.Noofdrains");
             var ProtrusionsArray        = model.GetValues("item.Protrusions");
             var VallerysArray           = model.GetValues("item.Vallerys");
             var RidgecapsArray          = model.GetValues("item.Ridgecaps");
             var AsbestosArray           = model.GetValues("item.Asbestos");
             var SubroofsArray           = model.GetValues("item.Subroofs");
             var RakingwallflashingArray = model.GetValues("item.Rakingwallflashing");
             var RakingwallcopingArray   = model.GetValues("item.Rakingwallcoping");
             var RailingArray            = model.GetValues("item.Railing");
             var AccessArray             = model.GetValues("item.Access");
             var ChimneysArray           = model.GetValues("item.Chimneys");
             var DumpstersArray          = model.GetValues("item.Dumpsters");
             var UseridArray             = model.GetValues("item.Userid");
             var InserteddatetimeArray   = model.GetValues("item.Inserteddatetime");
             for (Int32 i = 0; i < ProposalcheckpitchedroofidArray.Length; i++)
             {
                 proposalchecklistpitchedroofClass obj_update = db.selectById(Convert.ToInt32(ProposalcheckpitchedroofidArray[i]));
                 if (!string.IsNullOrEmpty(Convert.ToString(ProposalcheckpitchedroofidArray)))
                 {
                     obj_update.Proposalcheckpitchedroofid = Convert.ToInt32(ProposalcheckpitchedroofidArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(BuildingidArray)))
                 {
                     obj_update.Buildingid = Convert.ToInt32(BuildingidArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(IceandwatershieldArray)))
                 {
                     obj_update.Iceandwatershield = Convert.ToString(IceandwatershieldArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(DeckArray)))
                 {
                     obj_update.Deck = Convert.ToString(DeckArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(NoofdrainsArray)))
                 {
                     obj_update.Noofdrains = Convert.ToInt32(NoofdrainsArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(ProtrusionsArray)))
                 {
                     obj_update.Protrusions = Convert.ToString(ProtrusionsArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(VallerysArray)))
                 {
                     obj_update.Vallerys = Convert.ToString(VallerysArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(RidgecapsArray)))
                 {
                     obj_update.Ridgecaps = Convert.ToString(RidgecapsArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(AsbestosArray)))
                 {
                     obj_update.Asbestos = Convert.ToString(AsbestosArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(SubroofsArray)))
                 {
                     obj_update.Subroofs = Convert.ToString(SubroofsArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(RakingwallflashingArray)))
                 {
                     obj_update.Rakingwallflashing = Convert.ToString(RakingwallflashingArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(RakingwallcopingArray)))
                 {
                     obj_update.Rakingwallcoping = Convert.ToString(RakingwallcopingArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(RailingArray)))
                 {
                     obj_update.Railing = Convert.ToString(RailingArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(AccessArray)))
                 {
                     obj_update.Access = Convert.ToString(AccessArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(ChimneysArray)))
                 {
                     obj_update.Chimneys = Convert.ToString(ChimneysArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(DumpstersArray)))
                 {
                     obj_update.Dumpsters = Convert.ToString(DumpstersArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(UseridArray)))
                 {
                     obj_update.Userid = Convert.ToInt32(UseridArray[i]);
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(InserteddatetimeArray)))
                 {
                     obj_update.Inserteddatetime = Convert.ToDateTime(InserteddatetimeArray[i]);
                 }
                 db.update(obj_update);
             }
         }
     }
     return(RedirectToAction("EditTable"));
 }