private void btnSave_Click(object sender, EventArgs e) { string sErr = ""; BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); DTO.LIST_TASKInfo inf = new DTO.LIST_TASKInfo(); if (_processStatus == "C") { if (!ctr.IsExist(_dtb, txtCode.Text)) { ctr.Add(GetDataFromForm(inf), ref sErr); } else { sErr = txtCode.Text.Trim() + " is exist!"; } } else if (_processStatus == "A") { sErr = ctr.InsertUpdate(GetDataFromForm(inf)); } if (sErr == "") { _processStatus = "V"; EnableForm(false); } else { lbErr.Text = sErr; } }
private void btnEdit_Click(object sender, EventArgs e) { BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); if (ctr.IsExist(_dtb, txtCode.Text)) { EnableForm(true); //ddlQD.Enabled = false; txtCode.Enabled = false; _processStatus = "A"; } }
private void btnRun_Click(object sender, EventArgs e) { BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); if (ctr.IsExist(_dtb, txtCode.Text)) { DTO.LIST_TASKInfo inf = new DTO.LIST_TASKInfo(); inf = GetDataFromForm(inf); frmTestMail frm = new frmTestMail(GetDataFromForm(inf)); frm.ShowDialog(); } }
private void btnCopy_Click(object sender, EventArgs e) { BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); if (ctr.IsExist(_dtb, txtCode.Text)) { EnableForm(true); txtCode.Focus(); txtCode.SelectAll(); //txtCode.Text = ""; //_code = ""; _processStatus = "C"; } }
private void btnDelete_Click(object sender, EventArgs e) { BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); if (ctr.IsExist(_dtb, txtCode.Text)) { if (MessageBox.Show("Do you want to delete " + txtCode.Text + " schema?", "Message", MessageBoxButtons.OKCancel) == DialogResult.OK) { string sErr = ctr.Delete(_dtb, txtCode.Text); RefreshForm(""); EnableForm(false); _processStatus = ""; } } }
private void toolStripButton1_Click(object sender, EventArgs e) { frmEmail frm = new frmEmail(_dtb); if (frm.ShowDialog() == DialogResult.OK) { LoadListEmail(); BUS.LIST_TASKControl ctr = new BUS.LIST_TASKControl(); if (ctr.IsExist(_dtb, txtCode.Text)) { DTO.LIST_TASKInfo inf = new DTO.LIST_TASKInfo(); inf = GetDataFromForm(inf); SetListEmail(inf.Emails); } } }