Ejemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)   /// done button click
        {
            int mount = Convert.ToInt32(dl_exp_amouth.Text);

            // save data to databse and show in gridview

            // Display the selected date and time:

            // Display today's date and time:
            MessageBox.Show("Today is: " + DateTime.Today);
            MessageBox.Show("nexr day is: " + DateTime.Today.AddDays(1));


            string[] data = { dl_exp_type.Text, dl_exp_discription.Text, dl_exp_amouth.Text, dl_exp_today.Value.ToString() };
            string   msg  = lgic.ins_expence(data);

            MessageBox.Show(msg);
            dl_exp_amouth.Text      = "";
            dl_exp_discription.Text = "";
            addexpnc(dl_exp_type.Text, mount);
            ds.Clear();
            ds = lgic.get_tabl("expence");
            dl_exp_datagrid.DataSource = ds.Tables[0];

            dl_exp_type.Select();
        }
Ejemplo n.º 2
0
        private void sal_ad_done_Click(object sender, EventArgs e)
        {
            sal_ad_name.Select();
            string[] at = { sal_ad_name.Text,   sal_ad_invoicenmbr.Text, sal_ad_detail.Text,
                            sal_ad_total.Text,  sal_ad_pay.Text,         sal_ad_balance.Text,
                            sal_ad_status.Text, sal_datetoday.Value.ToString() };
            string   msg = lgic.invoicesale(at);

            MessageBox.Show(msg);


            ds = lgic.get_tabl("perchas");
            sal_gridview.DataSource = ds.Tables[0];
            count(ds);

            sal_srch_sal_name.DataSource = lgic.combodata("perchas", "saller_name");
            int index = sal_srch_sal_name.FindString(sal_ad_name.Text);

            sal_srch_sal_name.SelectedIndex = index;

            sal_ad_name.Text        = "";
            sal_ad_invoicenmbr.Text = "";
            sal_ad_detail.Text      = "";
            sal_ad_total.Text       = "0";
            sal_ad_pay.Text         = "0";
            sal_ad_balance.Text     = "0";
            sal_ad_name.Select();
        }
Ejemplo n.º 3
0
 public Expences()
 {
     InitializeComponent();
     lgic = new logic();
     ds   = lgic.get_tabl("expence");
     dl_exp_datagrid.DataSource = ds.Tables[0];
 }
Ejemplo n.º 4
0
 public Monthlyexpence()
 {
     InitializeComponent();
     lgic = new logic();
     ds   = lgic.get_tabl("account");
     acc_grid.DataSource = ds.Tables[0];
 }
Ejemplo n.º 5
0
        private void button4_Click(object sender, EventArgs e)  //done button
        {
            // here write function that save data

            string[] at = { invn_ad_cst_name.Text, invn_ad_invoicenmbr.Text, inv1_ad_detail.Text,
                            invn_ad_total.Text,    invn_ad_receive.Text,     invn_ad_balance.Text,
                            invn_ad_status.Text,   inv_datetoday.Value.ToString() };
            string   msg = lgic.invoicedata(at);

            MessageBox.Show(msg);

            ds = lgic.get_tabl("invoice");
            invn_gridview.DataSource = ds.Tables[0];
            count(ds);

            invn_srch_cst_name.DataSource = lgic.combodata("invoice", "customer_name");
            int index = invn_srch_cst_name.FindString(invn_ad_cst_name.Text);

            invn_srch_cst_name.SelectedIndex = index;

            inv1_ad_detail.Text      = "";
            invn_ad_invoicenmbr.Text = "";
            invn_ad_receive.Text     = "";
            invn_ad_total.Text       = "";
            invn_ad_balance.Text     = "";
            invn_ad_cst_name.Select();
        }
Ejemplo n.º 6
0
 public Buyinvoices()
 {
     InitializeComponent();
     lgic = new logic();
     ds   = lgic.get_tabl("perchas");
     sal_gridview.DataSource = ds.Tables[0];
     count(ds);
     sal_ad_name.DataSource       = lgic.combodata("perchas", "saller_name");
     sal_srch_sal_name.DataSource = lgic.combodata("perchas", "saller_name");
 }
Ejemplo n.º 7
0
 public Invoices()
 {
     InitializeComponent();
     lgic = new logic();
     ds   = lgic.get_tabl("invoice");
     invn_gridview.DataSource = ds.Tables[0];
     count(ds);
     invn_ad_cst_name.DataSource   = lgic.combodata("invoice", "customer_name");
     invn_srch_cst_name.DataSource = lgic.combodata("invoice", "customer_name");
 }
Ejemplo n.º 8
0
        void refrash()
        {
            // get from invoice table
            sal_totl = lgic.sumfun("total", "invoice");
            sal_rec  = lgic.sumfun("receive", "invoice");
            Sal_blnc = lgic.sumfun("balance", "invoice");



            // get sum from perchase table
            pr_totl = lgic.sumfun("total", "perchas");
            pr_pay  = lgic.sumfun("pay", "perchas");
            pr_blnc = lgic.sumfun("balance", "perchas");

            // get from expence table
            expnc = lgic.sumfun("expence", "expence");

            addexpence(lgic.get_tabl("expence"));
            putdata();
        }
Ejemplo n.º 9
0
 private void button3_Click(object sender, EventArgs e)
 {
     ds = lgic.get_tabl("account");
     acc_grid.DataSource = ds.Tables[0];
 }