public ActionResult SignUp(FormCollection frm)
        {
            UserSingUp ToConfirm = new UserSingUp();

            ToConfirm.TermAndConditions = Convert.ToBoolean(frm.Get("TermAndConditions"));
            string   ViewPassword      = frm.Get("Password");
            string   ViewPasswordAgain = frm.Get("PasswordAgain");
            string   ViewName          = frm.Get("Name");
            string   ViewSurName       = frm.Get("SurName");
            string   ViewEmail         = frm.Get("Email");
            BaseUser ToAdd             = new BaseUser();

            ToAdd.Authority   = "UnConfirmed";
            ToAdd.Email       = ViewEmail;
            ToAdd.Name        = ViewName;
            ToAdd.Password    = ViewPassword;
            ToAdd.SurName     = ViewSurName;
            ToConfirm.Name    = ViewName;
            ToConfirm.SurName = ViewSurName;
            ToConfirm.Email   = ViewEmail;
            if (ViewPassword != ViewPasswordAgain)
            {
                ViewBag.Mesaj = "Şifreler Uyuşmuyor";
                return(View(ToConfirm));
            }
            if (!ToConfirm.TermAndConditions)
            {
                ViewBag.Mesaj = "Sisteme Kayıt Olmak İçin Kullanıcı Sözleşmesini Onaylamanız Gerekir";
                return(View(ToConfirm));
            }
            _db.Users.Add(ToAdd);
            if (_db.SaveChanges() > 0)
            {
                return(RedirectToAction("SuccessPage", "Home"));
            }
            else
            {
                ViewBag.Mesaj = "Veri Tabanı Bağlantısı Sırasında Bir Hata Oluştu";
            }
            return(View(ToConfirm));
        }
        /// <summary>
        /// The function that works when a CreateAccountCommand is called
        /// </summary>
        private void CreateAccount()
        {
            UserSingUp w = new UserSingUp();

            w.ShowDialog();
        }
        public ActionResult SignUp()
        {
            UserSingUp ToSingUp = new UserSingUp();

            return(View(ToSingUp));
        }