예제 #1
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            //recuperer les informations de commande fournisseur

            int         id_cde;
            GridHitInfo celclick = gridView1.CalcHitInfo(gridControl1.PointToClient(Control.MousePosition));

            if (celclick.InRow)
            {
                int count = gridView1.DataRowCount;
                if (count != 0 && gridView1.FocusedRowHandle != DevExpress.XtraGrid.GridControl.AutoFilterRowHandle)
                {
                    System.Data.DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                    id_cde      = Convert.ToInt32(row[0]);
                    id_commande = Convert.ToInt32(row[0]);

                    req_non_feur = row[6].ToString();
                    DataTable dt = new DataTable();
                    sql_gmao  ss = new sql_gmao();
                    dt            = ss.get_list_cdefr(id_cde);
                    req_code      = Convert.ToInt32(dt.Rows[0]["id_commande"]);
                    req_emetteur  = dt.Rows[0]["client"].ToString();
                    req_code_feur = dt.Rows[0]["id_clt"].ToString();
                    req_date_cre  = dt.Rows[0]["date"].ToString();
                    req_date_env  = dt.Rows[0]["date"].ToString();
                    req_etat      = dt.Rows[0]["etatcmd"].ToString();
                    EtatCmd report = new EtatCmd(req_code);
                    report.ShowDialog();
                    //BoncmdFr al = new BoncmdFr();
                    //al.ShowDialog();
                }
            }
        }
예제 #2
0
        private void barButtonItem8_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int count = gridView1.DataRowCount;

            if (count != 0 && gridView1.FocusedRowHandle != DevExpress.XtraGrid.GridControl.AutoFilterRowHandle)
            {
                foreach (int i in gridView1.GetSelectedRows())
                {
                    System.Data.DataRow row = gridView1.GetDataRow(i);
                    int     code            = Convert.ToInt32(row[0].ToString());
                    EtatCmd report          = new EtatCmd(code);
                    report.ShowDialog();
                }
            }
        }