コード例 #1
0
        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;
            }
        }
コード例 #2
0
 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";
     }
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
 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";
     }
 }
コード例 #5
0
 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 = "";
         }
     }
 }
コード例 #6
0
        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);
                }
            }
        }