public ActionResult CreateUser(UserProfile objUser, string AllCollages, string AllUserRoles)
        {
            if (ModelState.IsValid)
            {
                objUser.CollageID = Convert.ToInt32(AllCollages);
                objUser.RoleID    = string.IsNullOrEmpty(AllUserRoles) ? 1002 : Convert.ToInt32(AllUserRoles);
                UserBusinessModel userProfile = new UserBusinessModel {
                    FirstName = objUser.FirstName,
                    LastName  = objUser.LastName,
                    UserName  = objUser.UserName,
                    Password  = objUser.Password,
                    CollageID = objUser.CollageID,
                    RoleID    = objUser.RoleID
                };

                adminBusinessOperations.CreaeUser(userProfile);
            }
            ViewBag.AllCollages  = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
            ViewBag.AllUserRoles = new SelectList(StaticMethod.GetAllUserRoles(), "RoleID", "RoleName");
            return(View(objUser));
        }
 public ActionResult CreateUser()
 {
     ViewBag.AllCollages  = new SelectList(StaticMethod.GetAlCollages(), "CollageID", "CollageName");
     ViewBag.AllUserRoles = new SelectList(StaticMethod.GetAllUserRoles(), "RoleID", "RoleName");
     return(View());
 }