Exemplo n.º 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtNumber.Text.Trim().Equals(""))
     {
         MessageBox.Show("", "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
     else
     {
         try
         {
             bool   blnSuccess = false;
             Loan   _obj       = new Loan();
             string strXML     = CreateNewXML();
             blnSuccess = _obj.AddNewLoanApplication(strXML);
             if (blnSuccess)
             {
                 MessageBox.Show("New loan application added successfully!", "New loan application", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 btnClear_Click(sender, e);
                 GetLoanApplicationList();
             }
             else
             {
                 MessageBox.Show("Transaction failed. Try again later", "Transaction failed", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show("Transaction failed. Try again later", "Transaction failed", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             LogError.LogEvent("", ex.Message, "AddNewLoanApplication");
         }
     }
 }