コード例 #1
0
ファイル: SetupController.cs プロジェクト: Zaneavi/RXGO
        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());
        }
コード例 #2
0
ファイル: SetupController.cs プロジェクト: Zaneavi/RXGO
 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"));
 }