예제 #1
0
파일: Reg.aspx.cs 프로젝트: slashgnr/CD
    private void AddUser()
    {
        UsersBL usersBL = new UsersBL();

        string username = "******";
        string firstname = "firstname";
        string lastname = "lastname";
        string email = "email";
        string password = "******";
        DateTime birthdate = Convert.ToDateTime("01/01/1980");
        EGender eGender = EGender.Female;

        usersBL.AddUser(this.Request, firstname, lastname, email, username, password, birthdate, eGender);
    }
예제 #2
0
파일: CD.master.cs 프로젝트: slashgnr/CD
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     LblLoginError.Text = string.Empty;
     UsersBL usersBL = new UsersBL();
     long lUserId =usersBL.GetUserid(loginUsername.Text, loginPassword.Text);
      if (lUserId > 0)
      {
          Session.Add(USERID, lUserId);
          LblLoginError.Text = "פרטים נכונים! " + Session[USERID].ToString();
      }
      else
      {
          Session.Remove(USERID);
          LblLoginError.Text = "פרטים שגויים";
      }
 }
예제 #3
0
파일: Regist.aspx.cs 프로젝트: slashgnr/CD
    protected void Button1_Click(object sender, EventArgs e)
    {
        UsersBL usersBL = new UsersBL();
        lblError.Text = string.Empty;
        if (!usersBL.IsUserExists(tbxUsername.Text))
        {
            string sUsername = tbxUsername.Text;
            string sFirstname = tbxFirstname.Text;
            string sLastname = tbxLastname.Text;
            string sEmail = tbxEmail.Text;
            string sPassword = password1.Text;
            DateTime dBirthdate = Convert.ToDateTime("03/07/1974");
            EGender eGender = EGender.Female;

            usersBL.AddUser(this.Request, sFirstname, sLastname, sEmail, sUsername, sPassword, dBirthdate, eGender);
        }
        else
        {
            lblError.Text = "שם משתמש זה אינו זמין.";
        }
    }
예제 #4
0
파일: Reg.aspx.cs 프로젝트: slashgnr/CD
 private void ValidateUser()
 {
     UsersBL usersBL = new UsersBL();
     usersBL.ValidateUser("username", "password1");
 }