Exemple #1
0
        private void barButtonItemedit_pub_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var      row2 = gridViewPub.FocusedRowHandle;
            int      id2;
            string   cellaoo;
            DateTime celldateJornal;
            DateTime celldateconvocation;
            DateTime cellDatePortail;
            DateTime celldateOverture;
            int      cell_validate;



            id2                 = int.Parse(gridViewPub.GetRowCellValue(row2, "id2").ToString());
            cellaoo             = gridViewPub.GetRowCellValue(row2, "Aop").ToString();
            celldateJornal      = Convert.ToDateTime(gridViewPub.GetRowCellValue(row2, "date_jornal").ToString());
            celldateconvocation = Convert.ToDateTime(gridViewPub.GetRowCellValue(row2, "date_convocation").ToString());
            cellDatePortail     = Convert.ToDateTime((gridViewPub.GetRowCellValue(row2, "date_portail")));
            celldateOverture    = Convert.ToDateTime(gridViewPub.GetRowCellValue(row2, "date_OP").ToString());
            cell_validate       = int.Parse(gridViewPub.GetRowCellValue(row2, "validate").ToString());


            publication pub = new publication(id2, cellaoo, celldateJornal, celldateconvocation, cellDatePortail, celldateOverture, cell_validate);

            pub.ShowDialog();
            select_Publication_Data();
        }
Exemple #2
0
        //public void RunStoredProc_Approbation()
        //{



        //    try
        //    {
        //        //for (int i = 0; i < gridViewOvert.DataRowCount; i++)
        //        //{
        //            //if (int.Parse(gridViewOvert.GetRowCellValue(i, "duree_approbation").ToString()) < 100)
        //            //{

        //                if (Program.sql_con.State == ConnectionState.Closed) Program.sql_con.Open();
        //                SqlCommand cmd = new SqlCommand("dbo.approbation_cursor", Program.sql_con);
        //                cmd.CommandType = CommandType.StoredProcedure;
        //                //cmd.Parameters.AddWithValue("@id", int.Parse(gridViewOvert.GetRowCellValue(i, "id3").ToString()));

        //                cmd.ExecuteNonQuery();
        //           // }

        //            //do something



        //    }
        //    finally
        //    {
        //        if (Program.sql_con != null)
        //        {
        //            Program.sql_con.Close();
        //        }
        //        if (Program.db != null)
        //        {
        //            Program.db.Close();
        //        }
        //    }
        //    select_Overt_Data();

        //}

        //public void RunStoredProc_caution()
        //{



        //    try
        //    {
        //        for (int i = 0; i < gridViewOvert.DataRowCount; i++)
        //        {
        //            if (int.Parse(gridViewOvert.GetRowCellValue(i, "duree_caution").ToString()) < 100)
        //            {

        //                if (Program.sql_con.State == ConnectionState.Closed) Program.sql_con.Open();
        //                SqlCommand cmd = new SqlCommand("dbo.CAUTION", Program.sql_con);
        //                cmd.CommandType = CommandType.StoredProcedure;
        //                cmd.Parameters.AddWithValue("@id", int.Parse(gridViewOvert.GetRowCellValue(i, "id3").ToString()));

        //                cmd.ExecuteNonQuery();
        //                MessageBox.Show("good");
        //            }

        //            //do something
        //        }



        //    }
        //    finally
        //    {
        //        if (Program.sql_con != null)
        //        {
        //            Program.sql_con.Close();
        //        }
        //        if (Program.db != null)
        //        {
        //            Program.db.Close();
        //        }
        //    }
        //    select_Overt_Data();

        //}

        //public void RunStoredProc_duree_order_service()
        //{



        //    try
        //    {
        //        for (int i = 0; i < gridViewOvert.DataRowCount; i++)
        //        {
        //            if (int.Parse(gridViewOvert.GetRowCellValue(i, "duree_order_service").ToString()) < 100)
        //            {

        //                if (Program.sql_con.State == ConnectionState.Closed) Program.sql_con.Open();
        //                SqlCommand cmd = new SqlCommand("dbo._order_service", Program.sql_con);
        //                cmd.CommandType = CommandType.StoredProcedure;
        //                cmd.Parameters.AddWithValue("@id", int.Parse(gridViewOvert.GetRowCellValue(i, "id3").ToString()));

        //                cmd.ExecuteNonQuery();

        //            }

        //            //do something
        //        }



        //    }
        //    finally
        //    {
        //        if (Program.sql_con != null)
        //        {
        //            Program.sql_con.Close();
        //        }
        //        if (Program.db != null)
        //        {
        //            Program.db.Close();
        //        }
        //    }
        //    select_Overt_Data();

        //}


        private void barButtonPublication_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            run();
            publication fm = new publication();

            fm.ShowDialog();

            select_Publication_Data();
        }