public ActionResult CreateRegForm(string search)
        {
            clsUserReg obj = new clsUserReg();

            obj.Department = GetDepartment();
            return(View(obj));
        }
        public ActionResult Edit(int id)
        {
            clsUserReg objnew = new clsUserReg();

            objnew = objnew.GetEUserData(id);

            return(View("EditUser", objnew));
        }
        public ActionResult GetAllUser()
        {
            clsUserReg        obj2 = new clsUserReg();
            List <clsUserReg> lst  = obj2.GetUsers();


            return(View(lst));
        }
예제 #4
0
        public ActionResult Delete(int?id)
        {
            clsUserReg cls = new clsUserReg();

            cls = cls.GetEUserData(id);

            return(View(cls));
        }
        public ActionResult Delete(int?id)
        {
            clsUserReg clsUser3 = new clsUserReg();

            clsUser3.DeleteUser(id);
            List <clsUserReg> lst = clsUser3.GetUsers();

            return(View("GetAllUser", lst));
        }
예제 #6
0
        public ActionResult Details(int id)
        {
            clsUserReg objnew = new clsUserReg();

            objnew = objnew.GetEUserData(id);



            return(View(objnew));
        }
        public ActionResult Edit(int id, clsUserReg objuser)
        {
            clsUserReg objnew = new clsUserReg();

            objnew.UpdateUser(objuser);

            //List<clsUserReg> lst = objnew.GetUsers();

            //return View("GetUsers", lst);

            return(RedirectToActionPermanent("GetAllUser"));
        }
        public ActionResult CreateRegForm(string EmpName, string bday, string DeptID, string EmpAdress, string City, string EmpMob)
        {
            clsUserReg obj = new clsUserReg();

            DateTime dtBday    = Convert.ToDateTime(bday);
            int      intDeptID = Convert.ToInt32(DeptID);
            double   dblMob    = Convert.ToDouble(EmpMob);

            obj.AddUser(EmpName, dtBday, intDeptID, EmpAdress, City, dblMob);


            ViewBag.Department = Session["Dpt"];

            ViewBag.message = "Registeration done successfully";
            return(View());
        }
        public ActionResult GetAllUser(string search)
        {
            clsUserReg obj2 = new clsUserReg();

            List <clsUserReg> lst = obj2.GetUsers();

            lst = clsUser.GetUsers().ToList();

            if (search != "" && search != null)

            {
                return(View(lst.Where(x => x.EmpName.StartsWith(search) || search == null).ToList()));
            }


            return(View(lst));
        }
예제 #10
0
        public ActionResult CreateRegForm(string EmpName, string bday, string Gender, string DeptID, string EmpAdress, string City, string EmpMob)
        {
            clsUserReg obj = new clsUserReg();

            DateTime dtBday    = Convert.ToDateTime(bday);
            int      intDeptID = Convert.ToInt32(DeptID);
            double   dblMob    = Convert.ToDouble(EmpMob);

            obj.AddUser(EmpName, dtBday, Gender, intDeptID, EmpAdress, City, dblMob);



            obj.Department  = GetDepartment();
            ViewBag.message = "Registeration done successfully";
            return(View(obj));

            //  return RedirectToActionPermanent("GetAllUser");
        }