Ejemplo n.º 1
0
        public ActionResult editdata(int id, string name, string address)
        {
            Models.FirstModel.first        obj = new Models.FirstModel.first();
            List <Models.FirstModel.first> Li  = obj.getdata(id, name, address);

            return(View("editData", Li.ToList()));
        }
Ejemplo n.º 2
0
        public ActionResult getdata()
        {
            Models.FirstModel.first        objcon = new Models.FirstModel.first();
            List <Models.FirstModel.first> Li     = objcon.getdata(0, "", "");

            return(View("home", Li.ToList()));
        }
Ejemplo n.º 3
0
        public ActionResult insertdata(string name = "", string address = "")
        {
            Models.FirstModel.first obj = new Models.FirstModel.first();
            obj.insertdata(name, address);
            List <Models.FirstModel.first> Li = obj.getdata(0, "", "");

            return(View("home", Li.ToList()));
        }
Ejemplo n.º 4
0
        public ActionResult deletedata(int id)
        {
            Models.FirstModel.first obj = new Models.FirstModel.first();
            obj.deletedata(id);
            List <Models.FirstModel.first> Li = obj.getdata(0, "", "");

            return(RedirectToAction("home", "first", new { id = 0 }));
        }
Ejemplo n.º 5
0
        public ActionResult savedata(string name, string address)
        {
            int id = Convert.ToInt32(Session["id"].ToString());

            Models.FirstModel.first obj = new Models.FirstModel.first();
            obj.updatedata(id, name, address);
            List <Models.FirstModel.first> Li = obj.getdata(0, "", "");

            return(View("home", Li.ToList()));
        }