コード例 #1
0
        public ActionResult SignUp(string name, string email, string password, string cpassword, string phone, string token, int permission)
        {
            var  mgr  = new UserAuthRepository();
            var  mgr2 = new AdminMembersRepository();
            User u    = mgr.AddUser(name, password, phone, email);

            mgr2.SetupMemberRel(token, u.Id, int.Parse(User.Identity.Name));
            return(RedirectToAction("Login", "Pages"));
        }
コード例 #2
0
        public ActionResult SignUp(string name, string password, string phone, string email)
        {
            var    mgr = new UserAuthRepository();
            string onlyNumericNumber = Regex.Replace(phone, @"[^0-9]", "");
            User   u = mgr.AddUser(name, password, onlyNumericNumber, email);
            //EmailManager em = new EmailManager();
            //em.SendWelcomeEmail(name, email);
            SMSManager SMS     = new SMSManager();
            string     message = "Welcome to Expiration Tracking App! You've officially take the first step torward  the pleasure of sitting back knowing your expiration dates are handled. - Happy Tracking ;)";

            SMS.Notification(u.PhoneNumber, message);
            FormsAuthentication.SetAuthCookie(u.Id.ToString(), true);
            return(RedirectToAction("index", "portal"));
        }
コード例 #3
0
        public ActionResult OrgSignUp(string name, string email, string phone, string password, string oname, string oemail, string oaddress, string ocity, string ostate, string ozip, string ophone, int year, IEnumerable <int> category)
        {
            var    mgr = new UserAuthRepository();
            string onlyNumericNumber = Regex.Replace(phone, @"[^0-9]", "");
            User   u = mgr.AddUser(name, password, onlyNumericNumber, email);
            //SMSManager SMS = new SMSManager();
            //string message = "Welcome to Expiration Reminder App! Thanks for setting up a new organization account with us and we look forward to working with you.";
            //SMS.Notification(u.PhoneNumber, message);
            Organization o = mgr.AddOrg(u.Id, oname, oaddress, oemail, ocity, ostate, ozip, ophone, year);

            mgr.CreateInitialUserOrdRel(o.Id, u.Id);
            foreach (int i in category)
            {
                mgr.CreateOrgReqItems(o.Id, i);
            }
            FormsAuthentication.SetAuthCookie(u.Id.ToString(), true);
            return(RedirectToAction("index", "portal"));
        }