private void lnkLbl_ExistantFailure_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (this.failureType != null) { //get the list of failures frm_ListOf frm = new frm_ListOf(Subject.FailureSbjct, this.failureType); frm.ShowDialog(); if (frm.Tag != null) { this.Failure = (Panne)frm.Tag; txtBx_Failure.Text = this.Failure.getName(); FailureDesc = this.Failure.getDescription(); this.procedure.setPanne(this.Failure); try { this.Failure.setTypePanne(this.failureType); } catch (Exception) { } } } else { MessageBox.Show(this, "Sélectionnez un type de panne d'abord", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btn_SendProcedure_Click(object sender, EventArgs e) { //frm_ListOf frm = new frm_ListOf(Subject.ProcedureSbjct); //frm.ShowDialog(); //if (frm.Tag != null) { //Procedure proc = (Procedure)frm.Tag; //Helper.service.SendProcedure(login, proc.getId()); if (this.CreatedProcedure != null) { Helper.service.SendProcedure(login, this.CreatedProcedure.getId()); MessageBox.Show(this, "Procedure envoyée avec succès.", "Message d'information", MessageBoxButtons.OK, MessageBoxIcon.Information); this.CreatedProcedure = null; } else { DialogResult dr = MessageBox.Show(this, "Vous n'avez pas créé des procedures, voullez vous choisir une?.", "Message d'erreur", MessageBoxButtons.YesNo, MessageBoxIcon.Error); if (dr == DialogResult.Yes) { frm_ListOf frm = new frm_ListOf(Subject.ProcedureSbjct); frm.ShowDialog(); if (frm.Tag != null) { Procedure proc = (Procedure)frm.Tag; Helper.service.SendProcedure(login, proc.getId()); MessageBox.Show(this, "Procedure envoyée avec succès.", "Message d'information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } }
private void supprimerProcedureToolStripMenuItem_Click(object sender, EventArgs e) { frm_ListOf frm = new frm_ListOf(Subject.ProcedureSbjct); frm.ShowDialog(); if (frm.Tag != null) { Procedure proc = (Procedure)frm.Tag; Manager.XMLResourceManager.XMLProcedure.Delete(proc.getId()); Manager.XMLResourceManager.XMLStep.RemoveByProcedure(proc.getId()); MessageBox.Show(this, "Opération terminée avec succès.", "Message d'information", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void lnkLbl_ExistantFailureType_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { //get the list of types of failure frm_ListOf frm = new frm_ListOf(Subject.FailureTypeSbjct); frm.ShowDialog(); if (frm.Tag != null) { this.failureType = (TypePanne)frm.Tag; txtBx_FailureType.Text = this.failureType.getName(); FailureTypeDesc = this.failureType.getDescription(); this.Failure = null; txtBx_Failure.Clear(); } }
private void btn_UpdateProcedure_Click(object sender, EventArgs e) { frm_ListOf frm = new frm_ListOf(Subject.ProcedureSbjct); frm.ShowDialog(); if (frm.Tag != null) { Procedure proc = (Procedure)frm.Tag; foreach (Etape etp in Etape.GetByProcedure(proc.getId())) { proc.addEtape(etp); //MessageBox.Show("etp.Objects.count: "+etp.getObjectList().Count,"RenderForm.btn_UpdateProcedure"); } //frm_AddProcedure frmProc = new frm_AddProcedure(proc.getPanne().getTypePanne(), proc.getPanne(), proc, Operation.Update); //frmProc.ShowDialog(); usrProcedure usrproc = new usrProcedure(this, proc.getPanne().getTypePanne(), proc.getPanne(), proc, Operation.Update); usrproc.Location = new Point(5, 115); this.Controls.Add(usrproc); } }
private void lnkLbl_ExistantFailure_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (this.failureType != null) { //get the list of failures frm_ListOf frm = new frm_ListOf(Subject.FailureSbjct, this.failureType); frm.ShowDialog(); if (frm.Tag != null) { this.Failure = (Panne)frm.Tag; txtBx_Failure.Text = this.Failure.getName(); FailureDesc = this.Failure.getDescription(); this.procedure.setPanne(this.Failure); try { this.Failure.setTypePanne(this.failureType); } catch (Exception) { } } } else MessageBox.Show(this, "Sélectionnez un type de panne d'abord", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); }