Пример #1
0
 protected void OpenPopUp(object sender, EventArgs e)
 {
     JobPopUp.Visible = true;
     if (Session["JobUser"] != null)
     {
         JobsWS.JobsWS proxy      = new JobsWS.JobsWS();
         JobsWS.UserWS loggedUser = proxy.GetUser((string)Session["JobUser"]);
         UserInfoText.InnerText = $"Username: {loggedUser.username} | First Name: {loggedUser.FirstName}";
         UserInfoText.Visible   = true;
         JobPopSec1.Visible     = false;
         JobPopSec2.Visible     = true;
         jobErrorMsg.Visible    = false;
     }
 }
Пример #2
0
        protected void JobLogIn(object sender, EventArgs e)
        {
            JobsWS.JobsWS proxy  = new JobsWS.JobsWS();
            bool          logged = proxy.LogIn(UserName.Text, Password.Text);

            if (logged)
            {
                JobsWS.UserWS loggedUser = proxy.GetUser(UserName.Text);
                UserInfoText.InnerText = $"Username: {loggedUser.username} | First Name: {loggedUser.FirstName}";
                UserInfoText.Visible   = true;
                JobPopSec1.Visible     = false;
                JobPopSec2.Visible     = true;
                jobErrorMsg.Visible    = false;
                Session["JobUser"]     = UserName.Text;
                Session["JobPass"]     = Password.Text;
            }
            else
            {
                jobErrorMsg.Visible = true;
            }
        }