Example #1
0
        private void experiment_Load(object sender, EventArgs e)
        {
            algo      o         = new algo();
            string    today     = o.month_id_method(s);
            sqlreturn sq        = new sqlreturn();
            string    yesterday = sq.scalarReturn("select top 1 f_m_id from monthly_fess ");
            string    montname  = o.month_name_method(s);

            if (today != yesterday)
            {
                DialogResult d = MessageBox.Show("you want to update it All", "imp msg", MessageBoxButtons.YesNo);

                if (d == DialogResult.Yes)
                {
                    string       initiallimit = sq.scalarReturn("select top 1 f_s_id from monthly_fess");
                    string       finallimit   = sq.scalarReturn("select top 1 f_s_id from monthly_fess ORDER BY f_s_id  DESC");
                    int          s1           = Convert.ToInt32(initiallimit);
                    int          sl           = Convert.ToInt32(finallimit);
                    update_class up           = new update_class();
                    for (int i = s1; i <= sl; i++)
                    {
                        up.update_monthchanges(i.ToString(), today, montname, System.DateTime.Now.Year.ToString());
                    }
                    MessageBox.Show("fees record has been UPDATED successfully.....");
                }
            }
        }
Example #2
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            {//MY CODE HANDLING
                biodata[0] = txtname.Text;
                biodata[1] = txtfname.Text;
                biodata[2] = txtreligion.Text;
                biodata[3] = cmbmonth.SelectedItem.ToString() + "-" + cmbyear.SelectedItem.ToString() + "-" + cmbdate.SelectedItem.ToString();
                biodata[4] = cmbclass.SelectedItem.ToString();
                biodata[5] = txtaddress.Text;
                biodata[6] = txtcontct.Text;
                biodata[7] = textBox5.Text; //date
                biodata[8] = textBox6.Text; //fess

                if (checkBox3.Checked == true)
                {
                    biodata[9] = "self";
                }
                else if (checkBox4.Checked == true)
                {
                    biodata[9] = "Transport";
                }
                else if (checkBox4.Checked == true && checkBox3.Checked == true)
                {
                    biodata[9] = "Both";
                }
                else
                {
                    biodata[9] = "NONE";
                }
                biodata[10] = txt_id.Text;      //fess

                MEDICALdata[0] = textBox1.Text; //HEIGHT
                MEDICALdata[1] = textBox2.Text; //WEIGHT
                MEDICALdata[2] = textBox3.Text; //EYESIGHT
                MEDICALdata[3] = textBox4.Text; //BLOODGROUP..
                MEDICALdata[4] = biodata[10];
            }
            //code handling....
            update_class up = new update_class();

            up.update_record(biodata);
            up.update_medicalreord(MEDICALdata);
        }