示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int i;

            String[] item_id = null;
            String   tmp;

            timestamp = db.createRecipt();
            for (i = 0; i <= dueFeeList.CheckedItems.Count - 1; i++)
            {
                tmp     = dueFeeList.CheckedItems[i].ToString();
                item_id = tmp.Split('#');
                payment_list.Add(item_id[1]);
            }
            if (payment_list.Count != 0)
            {
                if (db.feePay(payment_list, adm_no, timestamp))
                {
                    PrintFormetter f = new PrintFormetter(adm_no, dueFeeList.CheckedItems, timestamp);
                }
                else
                {
                    MessageBox.Show("Transition Failuer", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
            payment_list.Clear();
        }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (!mm_type.Text.ToString().Trim().Equals("") && mm_name.Text.Length > 3 && mm_purpose.Text.Length > 3)
     {
         try
         {
             char   val;
             string slipNo = db.createRecipt();
             if (mm_type.Text.Equals("Income"))
             {
                 val = 'I';
             }
             else
             {
                 val = 'O';
             }
             if (db.addExpense(slipNo, mm_name.Text.ToString(), mm_purpose.Text.ToString() + " " + mm_extranote.Text.ToString(), Int32.Parse(mm_amount.Text), val))
             {
                 PrintFormetter f = new PrintFormetter(mm_name.Text, slipNo, mm_purpose.Text.ToString() + "<br/>( " + mm_extranote.Text.ToString() + " )", Int32.Parse(mm_amount.Text));
             }
         }
         catch (Exception exp)
         {
             MessageBox.Show(exp.Message, "Error...", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("Importent fields are empty in this form.", "Warning", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning);
     }
 }
示例#3
0
 private void label9_Click_1(object sender, EventArgs e)
 {
     try
     {
         PrintFormetter p = new PrintFormetter(textBox6.Text.ToString(), textBox5.Text.ToString(), textBox9.Text.ToString(), textBox13.Text.ToString(), textBox7.Text.ToString() + " '" + textBox8.Text.ToString() + "' ", dataGridView2);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!comboBox2.Text.Equals("") && !monthYear.Text.Equals("") && textBox5.Text.Length > 0)
     {
         try
         {
             string recipt = db.createRecipt();
             if (db.addExpense(recipt, comboBox2.Text + " (Teacher)", "Salary Payed for Month " + monthYear.Text.ToString(), Int32.Parse(textBox5.Text), 'O'))
             {
                 PrintFormetter f = new PrintFormetter(comboBox2.Text + " (Teacher)", recipt, "Salary Payed for Month " + monthYear.Text.ToString(), Int32.Parse(textBox5.Text));
             }
         }
         catch (Exception exp)
         {
             MessageBox.Show(exp.Message, "Error...", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
         }
     }
 }