Пример #1
0
 private void btn_Transaction_Add_Click(object sender, EventArgs e)
 {
     try
     {
         if (sqlite.CheckExistValue("Transactions", "Name", cbo_Transactions.Text))
         {
             MessageBox.Show("Transaction [" + cbo_Transactions.Text + "] already exists", "Add transaction info", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         else
         {
             EntryList entr = new EntryList();
             entr.ColumnName.Add("Name");
             entr.Content.Add(cbo_Transactions.Text);
             entr.ColumnName.Add("TemplateID");
             entr.Content.Add(template_ID);
             entr.ColumnName.Add("IdentificationTxt");
             entr.Content.Add(fctxt_Identification.Text);
             entr.ColumnName.Add("SuccessfulTxt");
             entr.Content.Add(fctxt_Successful.Text);
             entr.ColumnName.Add("UnsuccessfulTxt");
             entr.Content.Add(fctxt_Unsuccessful.Text);
             sqlite.CreateEntry("Transactions", entr);
             MessageBox.Show("Add transaction [" + cbo_Transactions.Text + "] info successful", "Add transaction info", MessageBoxButtons.OK, MessageBoxIcon.Information);
             btn_Transaction_Refresh_Click(null, null);
             return;
         }
     }
     catch { }
     MessageBox.Show("Add transaction [" + cbo_Transactions.Text + "] info fail", "Add transaction info", MessageBoxButtons.OK, MessageBoxIcon.Error);
 }