Exemple #1
0
        private void makeInvoiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                btnprintview.Visible = false;
                dellblTb();
                lblowncompadd.Visible   = true;
                cmbcompanyname.Enabled  = false;
                cmbproductname.Enabled  = false;
                cmbquantityname.Enabled = false;
                cmbquantityname.Enabled = false;
                cmbpricename.Enabled    = false;
                btncancleoder.Enabled   = false;
                btncart.Enabled         = false;
                btnprinterorder.Enabled = false;
                lblownmob.Visible       = true;
                lblowncompname.Visible  = true;
                cmbcompanyname.Visible  = true;
                cmbproductname.Visible  = true;
                cmbquantityname.Visible = true;
                cmbpricename.Visible    = true;
                lblbillname.Visible     = true;
                lblbillno.Visible       = true;
                lbldatename.Visible     = true;
                lbldatenow.Visible      = true;
                lbldayname.Visible      = true;
                lbldays.Visible         = true;
                lblclientname.Visible   = true;
                lblquantityname.Visible = true;
                lblproduct.Visible      = true;
                lblprice.Visible        = true;
                dataGridView1.Visible   = true;
                btncart.Visible         = true;
                btnprinterorder.Visible = true;
                btnnewbill.Visible      = true;
                btncancleoder.Visible   = true;
                lblgrossname.Visible    = true;
                txttotalamount.Visible  = true;
                owncomp oc = new owncomp();
                lblowncompname.Text = oc.selectowncompanydetail().ToString();
                lblowncompadd.Text  = oc.selectownadddetail().ToString();
                lblownmob.Text      = oc.selectowncntctdetail().ToString();
                lblbillno.Text      = (oc.billdetail().ToString());
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     try
     {
         owncomp oc = new owncomp();
         dellblTb();
         btnprintview.Visible   = false;
         lblowncompname.Visible = true;
         lblowncompadd.Visible  = true;
         lblownmob.Visible      = true;
         lblowncompname.Text    = oc.selectowncompanydetail().ToString();
         lblowncompadd.Text     = oc.selectownadddetail().ToString();
         lblownmob.Text         = oc.selectowncntctdetail().ToString();
     }
     catch (Exception)
     {
     }
 }
Exemple #3
0
        private void btnnewbill_Click(object sender, EventArgs e)
        {
            try
            {
                cmbcompanyname.Focus();
                gen.Clear();
                dataGridView1.DataSource = null;
                cmbcompanyname.Focus();
                owncomp oc = new owncomp();
                lblowncompname.Text = oc.selectowncompanydetail().ToString();
                lblowncompadd.Text  = oc.selectownadddetail().ToString();
                lblownmob.Text      = oc.selectowncntctdetail().ToString();
                lblbillno.Text      = (oc.billdetail().ToString());
                lbldatenow.Text     = DateTime.Now.ToShortDateString();
                lbldays.Text        = DateTime.Now.DayOfWeek.ToString();
                //Company Combox
                cmbcompanyname.DataSource = oc.companycombobox();
                //PrductComboBox
                cmbproductname.DataSource = oc.productcombobox();
                txtownadd.Visible         = false;
                txtowncntct.Visible       = false;
                txtowncomp.Visible        = false;
                btnowncompsubmit.Visible  = false;
                lblowncntct.Visible       = false;
                lblowncompadd.Visible     = false;
                lblowncompany.Visible     = false;
                lblowncompanyadd.Visible  = false;
                btnSubmit.Visible         = false;
                btnCompanySubmit.Visible  = false;
                btnProductSubmit.Visible  = false;
                txtContact.Visible        = false;
                txtPassword.Visible       = false;
                txtUserName.Visible       = false;
                txtComanyContact.Visible  = false;
                txtCompanyAddress.Visible = false;
                txtCompantName.Visible    = false;
                lblCompanyContact.Visible = false;
                lblContact.Visible        = false;
                lblowncompname.Visible    = false;
                lblowncompadd.Visible     = false;
                lblownmob.Visible         = false;
                lblPassword.Visible       = false;
                lblUserName.Visible       = false;
                lblCompanyName.Visible    = false;
                lblAddress.Visible        = false;
                lblPrize.Visible          = false;
                lblQuantity.Visible       = false;
                lblProductNmae.Visible    = false;
                txtPrize.Visible          = false;
                txtQuantity.Visible       = false;
                txtProductName.Visible    = false;
                lblbillname.Visible       = true;
                lblbillno.Visible         = true;
                lbldatename.Visible       = true;
                lbldatenow.Visible        = true;
                lbldayname.Visible        = true;
                lbldays.Visible           = true;
                lblgrossname.Visible      = true;
                txttotalamount.Visible    = true;
                txttotalamount.Enabled    = true;
                btnnewbill.Visible        = true;
                cmbproductname.Enabled    = true;
                cmbquantityname.Visible   = true;
                cmbquantityname.Enabled   = true;
                cmbpricename.Enabled      = true;
                cmbpricename.Visible      = true;
                btncart.Enabled           = true;
                cmbcompanyname.Enabled    = true;
                btnprinterorder.Visible   = true;
                btnprinterorder.Enabled   = true;
                btnprintview.Visible      = false;//
                btnprintview.Enabled      = false;
                lblowncompname.Visible    = true;
                lblowncompadd.Visible     = true;
                lblownmob.Visible         = true;
                cmbcompanyname.Enabled    = true;

                btncancleoder.Enabled = true;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }