private void btnMA_Click(object sender, EventArgs e) { MAFormDialog ma = new MAFormDialog(this.ma); ma.btnOK.Visible = false; ma.btnCancel.Text = "ปิด"; ma.btnCancel.Focus(); ma.maDateFrom.Read_Only = true; ma.maDateTo.Read_Only = true; ma.maEmail.Read_Only = true; ma.ShowDialog(); }
private void btnEditMA_Click(object sender, EventArgs e) { MAFormDialog ma = new MAFormDialog(this); if (ma.ShowDialog() == DialogResult.OK) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate { this.getSerial(this.serial.id); }; worker.RunWorkerCompleted += delegate { this.fillSerialInForm(); }; worker.RunWorkerAsync(); } }