Example #1
0
        public ActionResult Create(int?ProjectId)
        {
            SectionModels model = new SectionModels();

            model.HeaderId = ProjectId;
            return(View(model));
        }
Example #2
0
        public ActionResult Edit(int?Id, int?ProjectId)
        {
            ClsStatic.ValidateReferral();


            sPlsSVQSections_Result rslt  = con.sPlsSVQSections("s", Id, ProjectId, null, null, null, null, User.Identity.Name).FirstOrDefault();
            SectionModels          model = new SectionModels();

            model.SectionId            = rslt.Id;
            model.HeaderId             = rslt.Id_SVQ_Headers;
            model.Section_Name         = rslt.Section_Name;
            model.Section_Title        = rslt.Section_Title;
            model.Section_Instructions = rslt.Section_Instructions;
            model.Is_Required_Section  = rslt.Is_Required_Section;

            return(View(model));
        }
Example #3
0
        public ActionResult Edit(SectionModels m)
        {
            try
            {
                uPlsSVQSections_Result rslt = con.uPlsSVQSections("u", m.SectionId, m.HeaderId, m.Section_Name, m.Section_Title, m.Section_Instructions, m.Is_Required_Section, User.Identity.Name).FirstOrDefault();
                if (rslt.Code == "000")
                {
                    TempData["Message"] = rslt.Message;
                    TempData["IsPopup"] = "y";
                    return(RedirectToAction("Index", "Sections", new { Id = m.HeaderId }));
                }
                else
                {
                    ModelState.AddModelError("", "Error! Code[" + rslt.Code + "]: " + rslt.Message);
                }
            }

            catch
            {
                ModelState.AddModelError("", "Techinical Error Occurred While Processing Your Request");
            }
            return(View(m));
        }
 public async Task <SectionModel> GetSection(int sectionId, int tenantId)
 {
     return(SectionModels.FirstOrDefault());
 }
 public async Task <List <SectionModel> > GetSections(List <int> sectionIds, int tenantId)
 {
     return(SectionModels.Where(i => sectionIds.Contains(i.SectionId)).ToList());
 }