예제 #1
0
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            //Tnumfact.Visible = true;
            //simpleButton5.Visible = true;
            //labelControl1.Visible = true;
            //labelControl2.Visible=true;
            //dateEdit1.Visible=true;
            //labelControl3.Visible = true;
            //textEdit1.Visible = true;
            string num_fact = NumFact().ToString();

            //num_facture = DateTime.Now.Year.ToString().Substring(2, 2) + " /" + num_fact;
            Tnumfact.Text = num_fact;
            //DateTime.Now.Year.ToString().Substring(2,2)+" /"+
            List <int> LidBl = new List <int>();

            foreach (int i in gridView1.GetSelectedRows())
            {
                DataRow row = gridView1.GetDataRow(i);

                LidBl.Add(Convert.ToInt32(row[0].ToString()));
            }
            FactureVente factvent = new FactureVente(LidBl);

            factvent.ShowDialog();
        }
예제 #2
0
        private void gridControl1_DoubleClick(object sender, EventArgs e)
        {
            int count = gridView1.DataRowCount;

            if (count != 0 && gridView1.FocusedRowHandle != DevExpress.XtraGrid.GridControl.AutoFilterRowHandle)
            {
                System.Data.DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                id_fact = Convert.ToInt32(row[1].ToString());
                FactureVente fatvent = new FactureVente(id_fact);
                fatvent.ShowDialog();
                //FactureReport report = new FactureReport(id_fact);
                //report.ShowPreview();
                //string dt = row[2].ToString();
                //num_fact = Convert.ToDateTime(dt).Year.ToString().Substring(2, 2) + " /" + row[0].ToString();
                //facturing f = new facturing();
                //f.ShowDialog();
            }
        }