public ActionResult RRReject(int id)
 {
     if (CheckAccess())
     {
         var request   = rrrepo.GetById(id);
         var rrlogdata = new RegistrationRequestLog();
         rrlogdata.UserName        = request.UserName;
         rrlogdata.UserType        = request.UserType;
         rrlogdata.SupportUserName = Session["UserName"].ToString();
         rrlogdata.Date            = DateTime.Now;
         rrlogdata.Status          = "Rejected";
         rrlogrepo.Insert(rrlogdata);
         rrrepo.Delete(id);
         return(RedirectToAction("ViewRegistrationRequest"));
     }
     else
     {
         return(RedirectToAction("Login", "Home"));
     }
 }
        public ActionResult RRApprove(int id)
        {
            if (CheckAccess())
            {
                var request = rrrepo.GetById(id);

                var rrlogdata = new RegistrationRequestLog();
                rrlogdata.UserName        = request.UserName;
                rrlogdata.UserType        = request.UserType;
                rrlogdata.SupportUserName = Session["UserName"].ToString();
                rrlogdata.Date            = DateTime.Now;
                rrlogdata.Status          = "Accepted";

                var userdata = new User();
                userdata.UserName   = request.UserName;
                userdata.Password   = request.Password;
                userdata.UserType   = request.UserType;
                userdata.UserStatus = "Active";

                var customerdata = new Customer();
                customerdata.CustomerName   = request.Name;
                customerdata.UserName       = request.UserName;
                customerdata.Email          = request.Email;
                customerdata.Gender         = request.Gender;
                customerdata.DateOfBirth    = request.DateOfBirth;
                customerdata.Address        = request.Address;
                customerdata.ProfilePicture = request.ProfilePicture;
                customerdata.Status         = "Active";


                userrepo.Insert(userdata);
                customerrepo.Insert(customerdata);
                rrlogrepo.Insert(rrlogdata);
                rrrepo.Delete(id);
                return(RedirectToAction("ViewRegistrationRequest"));
            }
            else
            {
                return(RedirectToAction("Login", "Home"));
            }
        }