private void TXT_COMPANY_NAME_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TXT_ADDRESS.Focus();
     }
 }
 private void TXT_PASSPORT_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TXT_ADDRESS.Focus();
     }
 }
예제 #3
0
 private void BTN_SAVE_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(TXT_AGENT_NAME.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Agent Name", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_AGENT_NAME.Focus();
     }
     else if (String.IsNullOrEmpty(TXT_ADDRESS.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Agent Address", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_ADDRESS.Focus();
     }
     else if (String.IsNullOrEmpty(TXT_COMPANY_NAME.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Company Name", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_COMPANY_NAME.Focus();
     }
     else if (String.IsNullOrEmpty(TXT_CONTACT_NO.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Contact Number", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_CONTACT_NO.Focus();
     }
     else if (String.IsNullOrEmpty(TXT_COMPANY_CONTACT_NO.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Company Contact Number", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_COMPANY_CONTACT_NO.Focus();
     }
     else if (String.IsNullOrEmpty(TXT_COM_RATE.Text))
     {
         MSGBOX mdg = new MSGBOX(MessageAlertHeder.Warning(), "Enter Commision Rate", MessageAlertImage.Warning());
         mdg.ShowDialog();
         TXT_COM_RATE.Focus();
     }
     else
     {
         if (BTN_SAVE.Text == "SAVE")
         {
             AddAgent();
         }
         else if (BTN_SAVE.Text == "UPDATE")
         {
             UpdateAgent();
         }
     }
 }