Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if(txtUserName.Text == "" || txtPassword.Text == "")
         {
             MessageBox.Show(Common.GetResourceString("MSG_LOGIN_EMPTY"));
             return;
         }
         Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(txtUserName.Text.Trim(), txtPassword.Text.Trim());
         if (listMachine == null)
         {
             MessageBox.Show(Common.GetResourceString("LoginFail"));
         }
         else
         {
             frmUpload frmUpload = new frmUpload();
             frmUpload.FillMachine(listMachine.ToList());
             frmUpload.LoginUser = txtUserName.Text.Trim();
             frmUpload.ShowDialog();
             this.Dispose();
         }
     }
     catch(Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtUserName.Text == "" || txtPassword.Text == "")
         {
             MessageBox.Show(Common.GetResourceString("MSG_LOGIN_EMPTY"));
             return;
         }
         Machine[] listMachine = VMISCommon.WS.GetListMachineFromUser(txtUserName.Text.Trim(), txtPassword.Text.Trim());
         if (listMachine == null)
         {
             MessageBox.Show(Common.GetResourceString("LoginFail"));
         }
         else
         {
             frmUpload frmUpload = new frmUpload();
             frmUpload.FillMachine(listMachine.ToList());
             frmUpload.LoginUser = txtUserName.Text.Trim();
             frmUpload.ShowDialog();
             this.Dispose();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }