private void bntUpdate_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtNewPassoword.Text) && string.IsNullOrEmpty(txttxtNewPassowordAgain.Text))
     {
         MessageBox.Show("Eksik Veri Girişi Yaptınız ", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         StaffBusiness sb    = new StaffBusiness();
         var           staff = sb.GetByUsername(UserText);
         if (txtNewPassoword.Text == txttxtNewPassowordAgain.Text)
         {
             staff.Password = txtNewPassoword.Text;
             sb.Update(staff);
             MessageBox.Show("Şifreniz Başarıyla Güncellendi \n Yeni Şifreniz= " + txttxtNewPassowordAgain.Text + "");
             UserLoginForm userLoginForm = new UserLoginForm();
             userLoginForm.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Girdiğiniz Şifreler Uyusmadı Kontrol Ediniz ", "", MessageBoxButtons.OK, MessageBoxIcon.Question);
         }
     }
 }
        private void bntConfirmation_Click(object sender, EventArgs e)
        {
            if (txtAnswer.Text == "")
            {
                errorProvider1.SetError(txtAnswer, "Güvenlik Cevabınızı Giriniz");
            }
            else
            {
                errorProvider1.Clear();

                StaffBusiness sb    = new StaffBusiness();
                var           staff = sb.GetByUsername(UserText);
                if (staff.SecurityAnswer == txtAnswer.Text)
                {
                    MessageBox.Show("Güvenlik Cevabınız Doğru", "GÜVENLİK", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    panel1.Visible          = true;
                    txtAnswer.Visible       = false;
                    lblUsername.Visible     = false;
                    lblQuestion.Visible     = false;
                    label4.Visible          = false;
                    label6.Visible          = false;
                    label7.Visible          = false;
                    btnConfirmation.Visible = false;
                }
                else
                {
                    MessageBox.Show("Güvenlik Cevabınız Yanlış", "GÜVENLİK", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        private void enter(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (Char)Keys.Enter)
            {
                if (txtAnswer.Text == "")
                {
                    errorProvider1.SetError(txtAnswer, "Güvenlik Cevabınızı Giriniz");
                }
                else
                {
                    errorProvider1.Clear();

                    StaffBusiness sb    = new StaffBusiness();
                    var           staff = sb.GetByUsername(UserText);
                    if (staff.SecurityAnswer == txtAnswer.Text)
                    {
                        MessageBox.Show("Güvenlik Cevabınız Doğru", "GÜVENLİK", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        panel1.Visible = true;
                    }
                    else
                    {
                        MessageBox.Show("Güvenlik Cevabınız Yanlış", "GÜVENLİK", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }
Пример #4
0
        public HttpResponseMessage Get(int id)
        {
            try
            {
                StaffBusiness staffBusiness = new StaffBusiness();

                var    result   = staffBusiness.Find(id);
                Staffs tempData = new Staffs()
                {
                    CompanyId                    = result.CompanyId,
                    Name                         = result.Name,
                    Surname                      = result.Surname,
                    Address                      = result.Address,
                    DatetimeOfCreated            = result.DatetimeOfCreated,
                    Username                     = result.Username,
                    PhotoURL                     = result.PhotoURL,
                    CityOfBirth                  = result.CityOfBirth,
                    IdentificationNumber         = result.IdentificationNumber,
                    BeginningDateOfDriverLicense = result.BeginningDateOfDriverLicense,
                    EndingDateOfDriverLicense    = result.EndingDateOfDriverLicense,
                    Password                     = result.Password,
                    Id = result.Id
                };


                return(Request.CreateResponse(HttpStatusCode.OK, tempData));
            }
            catch (Exception ex)
            {
                LogHelper.Log(LogTarget.File,
                              "Staff Get failed. " + "\n" + ExceptionHelper.ExceptionToString(ex));
                return(null);
            }
        }
Пример #5
0
        public ActionResult StaffAccountList()
        {
            StaffBusiness StaffBO = new StaffBusiness();
            var           Model   = StaffBO.GetAllStaff().OrderByDescending(s => s.StaffID).ToList();

            return(View(Model));
        }
        public AccountController()
        {
            RSMEntities db = new RSMEntities();

            AccBO   = new AccountBusiness(db);
            StaffBO = new StaffBusiness(db);
            InsBO   = new InstructorBusiness(db);
            StuBO   = new StudentBusiness(db);
        }
        private void StaffPasswordUpdateForm_Load(object sender, EventArgs e)
        {
            StaffBusiness sb    = new StaffBusiness();
            var           staff = sb.GetByUsername(UserText);

            lblQuestion.Text                     = staff.SecurityQuestion;
            lblUsername.Text                     = staff.UserName;
            txtNewPassoword.PasswordChar         = '*';
            txttxtNewPassowordAgain.PasswordChar = '*';
        }
Пример #8
0
        public AdminController()
        {
            RSMEntities db = new RSMEntities();

            StuBO     = new StudentBusiness(db);
            ClaBO     = new ClassBusiness(db);
            ReBO      = new RequestBusiness(db);
            SlFactory = new SelectListFactory(db);
            StaffBO   = new StaffBusiness(db);
            AccBO     = new AccountBusiness(db);
            StuImBO   = new StudentImageBusiness(db);
        }
Пример #9
0
        public Staffs GetEncKey(Staffs entity)
        {
            try
            {
                StaffBusiness staffBusiness = new StaffBusiness();

                var tempStaffs = staffBusiness.GetEncryptedKey(entity.Username);

                return(tempStaffs);
            }
            catch (Exception ex)
            {
                LogHelper.Log(LogTarget.File,
                              "Staff Get Enc failed. " + "\n" + ExceptionHelper.ExceptionToString(ex));
                return(null);
            }
        }