Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (amount.Text == "" || validity.Text == "")
     {
         MessageBox.Show("All fields are required!");
     }
     else
     {
         try
         {
             viewClass v      = new viewClass();
             int       i      = Int32.Parse(validity.Text.ToString());
             DateTime  expire = dateTimePicker1.Value.AddMonths(i);
             v.feesInsert((int)user_id.SelectedValue, Int32.Parse(amount.Text.ToString()), Int32.Parse(validity.Text.ToString()), dateTimePicker1.Value.ToString("MM-dd-yyyy"), expire.ToString("MM-dd-yyyy"));
             amount.Clear();
             validity.Clear();
             v.check();
             MessageBox.Show("Record Inserted");
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
Ejemplo n.º 2
0
        public SplashScreen()
        {
            InitializeComponent();
            timer1.Start();
            viewClass v = new viewClass();

            v.check();
        }