예제 #1
0
파일: Form4.cs 프로젝트: Zoltan21/Csharp
 public Clients(AdminController adminC)
 {
     InitializeComponent();
     adminController = adminC;
     DataTable dt = adminC.viewClients();
     dataGridView1.DataSource = dt;
 }
예제 #2
0
파일: Form1.cs 프로젝트: Zoltan21/Csharp
 private void btnLogin_Click(object sender, EventArgs e)
 {
     //Login into the application
     user = authController.login(txtUserName.Text, txtPassword.Text);
     if (user != null)
     {
         if (user.Status == 0)
         {
             ClientController clientController = new ClientController();
             Main main=new Main(clientController,user);
             main.Show(this);
             main.FormClosed += new FormClosedEventHandler(adminMain_FormClosed);
             this.Hide();
         }
         else
         {
             AdminController adminController = new AdminController();
             AdminMain adminMain = new AdminMain(adminController);
             adminMain.Show(this);
             adminMain.FormClosed += new FormClosedEventHandler(adminMain_FormClosed);
             this.Hide();
         }
     }
 }
예제 #3
0
 public AdminMain(AdminController adminController)
 {
     InitializeComponent();
     this.adminController = adminController;
 }