private void button1_Click(object sender, EventArgs e) { if (ServiceController.FinishWork(cus.localid, mch.machineid, cm.customermachineid, cm.dayadd, saveactive)) { this.DialogResult = DialogResult.OK; } }