예제 #1
0
 private void btnSıgnIn_Click(object sender, EventArgs e)
 {
     user              = new User();
     loginDTO          = new LoginDTO();
     loginDTO.Email    = txtEmail.Text;
     loginDTO.Password = txtPassword.Text;
     try
     {
         user = _userController.UserLogin(loginDTO);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return;
     }
     if (user.RoleID == 1)
     {
         frmAdmin frmAdmin = new frmAdmin(user, this);
         ChangeVisible();
         frmAdmin.Show();
     }
     else
     {
         frmUser frmUser = new frmUser(user, this);
         ChangeVisible();
         frmUser.Show();
     }
 }
예제 #2
0
 public frmPayment(User currentUser, Form frm)
 {
     InitializeComponent();
     user = currentUser;
     _paymentController = new PaymentController();
     _userController    = new UserController();
     frmUser            = (frmUser)frm;
 }