예제 #1
0
        protected void Log_In(object sender, EventArgs e)
        {
            SignUp_In c = new SignUp_In();
            User      u = new User();

            try
            {
                u = c.SignIN(new User(unameId.Value, passwordId.Value));
            }
            catch (Exception ex)
            {
                error1.Text = ex.Message;
            }
            if (u.Status == "Unknown")
            {
                unknownstatus.Visible = true;
                updateStatus.Text     = "<br /> Hello " + unameId.Value + " " +

                                        "Your account is currently not active." + " <br /><br />" + "An administrator needs to activate your account before you can login.<br />";
            }
            if (u.Status == "Client")
            {
                if (c.FirstTime(u.Id))
                {
                    Session["Value"] = u.Id;
                    Response.Redirect("~/ClientFolder/ClientFirstTime.aspx");
                }
                else
                {
                    Session["Value"] = u.Id;
                    Response.Redirect("~/ClientFolder/ClientP.aspx");
                }
            }
            if (u.Status == "Manager")
            {
                Session["Value"] = u.Id;
                Response.Redirect("~/ManagerFolder/AccountManager.aspx");
            }
            if (u.Status == "Secretary")
            {
                Session["Value"] = u.Id + "@secretary";
                Response.Redirect("~/SecretaryFolder/AccInformation.aspx");
            }
        }
예제 #2
0
        protected void Log_In(object sender, EventArgs e)
        {
            SignUp_In c = new SignUp_In();
            User      u = new User();

            try
            {
                u = c.SignIN(new User(unameId.Value, passwordId.Value));
            }
            catch (Exception ex)
            {
                error1.Text = ex.Message;
            }
            if (u.Status == "Unknown")
            {
                unknownstatus.Text = "< h1 > Thank you for signing up to < em > Cavalry Associates </ em ></ h1 > " +

                                     "We will do our best to respond to your inquiry as soon as possible";
            }
            if (u.Status == "Client")
            {
                if (c.FirstTime(u.Id))
                {
                    Session["Value"] = u.Id;
                    Response.Redirect("~/ClientFolder/ClientFirstTime.aspx");
                }
                else
                {
                    Session["Value"] = u.Id;
                    Response.Redirect("~/ClientP.aspx");
                }
            }
            if (u.Status == "Manager")
            {
                Session["Value"] = u.Id;
                Response.Redirect("~/ManagerFolder/AccountManager.aspx");
            }
            if (u.Status == "Secretary")
            {
                Session["Value"] = u.Id + "@secretary";
                Response.Redirect("~/SecretaryFolder/AccInformation.aspx");
            }
        }