private void BTN_Delete_Click(object sender, EventArgs e) { if (MessageBox.Show("Effacer le renouvellement d'ordonnance courant?", "Attention", MessageBoxButtons.OKCancel) == DialogResult.OK) { currentPrescriptionRenewal = null; this.Refresh(); Update_UI(); } }
private void BTN_New_Click(object sender, EventArgs e) { DLG_PrescriptionRenewal dlg = new DLG_PrescriptionRenewal(); dlg.Stores = Stores; if (dlg.ShowDialog() == DialogResult.OK) { currentPrescriptionRenewal = dlg.PrescriptionRenewal; this.Refresh(); Update_UI(); } }
private void Init_UI() { MTBX_ZipCode.Mask = "L0L"; MTBX_ZipCode.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; MTBX_Phone.Mask = "(000) 000-0000"; MTBX_Phone.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; MTBX_PrescriptionNumber.Mask = "Rx 0000000-0000"; MTBX_PrescriptionNumber.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; if (prescriptionRenewal != null) { prescriptionRenewal_to_Dlg(); BTN_Ok.Text = "Modify"; } else { prescriptionRenewal = new PrescriptionRenewal(); prescriptionRenewal.Store = Stores[14]; prescriptionRenewal.Client = new Client(); } }
private void Init_UI() { TBX_FirstName.MaxLength = 32; TBX_LastName.MaxLength = 32; MTBX_ZipCode.Mask = "L0L"; MTBX_ZipCode.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; MTBX_Phone.Mask = "(000) 000-0000"; MTBX_Phone.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; MTBX_PrescriptionNumber.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; if (PrescriptionRenewal == null) { PrescriptionRenewal = new PrescriptionRenewal(); } else { BTN_Ok.Text = "Modifier"; Contact_To_Dlg(); } }
public DLG_PrescriptionRenewal(PrescriptionRenewal prescription = null) { InitializeComponent(); prescriptionRenewal = prescription; }