private void btn_EditionPDF_Click(object sender, EventArgs e) { BordereauEnvoi be = new BordereauEnvoi(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[1].Value), dataGridViewBE.CurrentRow.Cells[2].Value.ToString(), dataGridViewBE.CurrentRow.Cells[4].Value.ToString(), dataGridViewBE.CurrentRow.Cells[5].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[6].Value), BDDPlan.getAllPlanBE(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), sessionUser.projetModif.code_Projet)); FormAdresseBordereau fAd = new FormAdresseBordereau(be); fAd.ShowDialog(); }
private void btn_ValidationBE_Click(object sender, EventArgs e) { BordereauEnvoi be; if (dataGridViewBE.Rows.Count > 0) { be = new BordereauEnvoi(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[1].Value), dataGridViewBE.CurrentRow.Cells[2].Value.ToString(), dataGridViewBE.CurrentRow.Cells[4].Value.ToString(), dataGridViewBE.CurrentRow.Cells[5].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[6].Value), BDDPlan.getAllPlanBE(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), sessionUser.projetModif.code_Projet)); if (be.Etat == 1) { // Validation bordereau envoi BDDBordereauEnvoi.UpdateBordereauEnvoiValidation(be.Code_Bordereau, 2); foreach (Plan plan in be.ListPlan) { // Valid_Archi BDDValidArchi.CreateVA(be.Code_Bordereau, plan.Code_Plan, plan.Indice, 1); // Valid_BC BDDValidBC.CreateVBC(be.Code_Bordereau, plan.Code_Plan, plan.Indice, 1); } LoadBE(); } else { MessageBox.Show("Le bordereau " + be.Code_Bordereau + " a déjà été validé !"); } } }
private void btn_ModificationBE_Click(object sender, EventArgs e) { BordereauEnvoi be; if (dataGridViewBE.Rows.Count > 0) { be = new BordereauEnvoi(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[1].Value), dataGridViewBE.CurrentRow.Cells[2].Value.ToString(), dataGridViewBE.CurrentRow.Cells[4].Value.ToString(), dataGridViewBE.CurrentRow.Cells[5].Value.ToString(), Convert.ToInt32(dataGridViewBE.CurrentRow.Cells[6].Value), BDDPlan.getAllPlanBE(dataGridViewBE.CurrentRow.Cells[0].Value.ToString(), sessionUser.projetModif.code_Projet)); if (be.Etat == 1) { FormCUBordereauEnvoi f1 = new FormCUBordereauEnvoi(be); this.Hide(); f1.ShowDialog(); LoadBE(); this.Show(); } else { MessageBox.Show("Le bordereau " + be.Code_Bordereau + " a été validé et ne peut plus être modifié !"); } } }