Ejemplo n.º 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     try
     {
         timerTime.Start();
         TodayPanel.Height    = dropHieght;
         pantodayicon.Visible = false;
         lbltime.Text         = DateTime.Now.ToShortTimeString();
         new Thread(() =>
         {
             //PREPARE THE DEBTORS LIST AT THE BACKGROUND
             var ground    = new GroundWorker();
             var eventList = new EvenPayList();
             AppStarted   += ground.OnAppStarted;
             AppStarted   += eventList.OnAppStarted;
             OnAppStarted();
         }).Start();
         lblLogin.Text = AdminLog.Admin;
         if (string.IsNullOrEmpty(AppActivation.isActivated()))
         {
             notifyTime = 15;
             Notify();
             timer1.Enabled = true;
             timer1.Start();
         }
     }
     catch (Exception Ex)
     {
     }
 }
Ejemplo n.º 2
0
 private void btnclose_Click(object sender, EventArgs e)
 {
     new Thread(() =>
     {
         var eventPay = new EvenPayList();
         PaymentMade += eventPay.OnAppStarted;
         OnPaymentMade();
     }).Start();
     this.Close();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// ADD THIS FEATURE IN NEW VERSIONS
        /// </summary>
        private void debtPayment()
        {
            try
            {
                con.Open();
                Total = paidAmount + payAmount;
                //THIS SECTION IS NOT IN USE FOR NOW

                //CODE THE UPDATE QUERY LATER
                //SqlCommand cmdDebtepay = new SqlCommand(, con);
                //cmdDebtepay.ExecuteNonQuery();
                con.Close();
                dataAccess.Description = "Paid debt for " + txtFeeName.Text;
                dataAccess.Activities();
                Cash chpay = new Cash();
                chpay.insertEventPay(txtname, txtClass, txtFeeName, combTerm, txtAmount, dateTimePicker1, combInstall, Feetype);
                Cash.paid = true;
                if (checkTaller.Checked == true && string.IsNullOrEmpty(Taller.TallerID) == false)
                {
                    var ID = CashID();
                    taller.UpdateTaller(ID);
                }
                MessageBox.Show("Fee Paid Successfully", "Payment Successful", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ClearAll();
                new Thread(() =>
                {
                    var eventPay = new EvenPayList();
                    PaymentMade += eventPay.OnAppStarted;
                    OnPaymentMade();
                }).Start();
            }

            catch (SqlException Ex)
            {
                con.Close();
                MessageBox.Show(Ex.Message + "\nPayment Not Succeful", "Payment Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (Exception Ex)
            {
                con.Close();
                MessageBox.Show(Ex.Message + "\nPayment Not Succeful", "Payment Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }