Exemple #1
0
        public ActionResult Symphead()
        {
            List <Symphead> CategoryList = new List <Symphead>();
            Property        p            = new Property();
            DataSet         ds           = new DataSet();

            p.OnTable = "FetchSymphead";

            ds = dl.FetchSymphead_sp(p);

            try
            {
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    Symphead m = new Symphead();

                    m.SympId          = item["SympId"].ToString();
                    m.Symptomshead    = item["Symptomshead"].ToString();
                    m.SymptomsType    = item["SymptomsType"].ToString();
                    m.SympDescription = item["SympDescription"].ToString();
                    m.IsActive        = item["IsActive"].ToString();
                    CategoryList.Add(m);
                }
                ViewBag.CategoryList = CategoryList;
            }
            catch (Exception e)
            {
            }
            return(View());
        }
Exemple #2
0
 public ActionResult Symphead(Symphead c)
 {
     try
     {
         if (dl.InsertSymphead_Sp(c) > 0)
         {
             TempData["MSG"] = "Data Saved Successfully";
         }
     }
     catch (Exception ex)
     {
         TempData["MSG"] = "Something went wrong.";
         return(Redirect("/Setup/Symphead"));
     }
     TempData["MSG"] = "Data Saved Successfully.";
     return(Redirect("/Setup/Symphead"));
 }