Example #1
0
        private void mnuEditEdit_Click(object sender, EventArgs e)
        {
            DataRow dr = CurRec("Notes");

            if (dr == null)
            {
                return;
            }

            frmAdd fAdd = new frmAdd();

            fAdd.stNote    = dr["Text"].ToString();
            fAdd.stCaption = dr["Caption"].ToString();
            fAdd.bEdit     = true;
            fAdd.ShowDialog();

            if (fAdd.bSuccess)
            {
                dr["Text"]    = fAdd.stNote;
                dr["Caption"] = fAdd.stCaption;
            }

            if (!cConfig.SaveConfig())
            {
                CommonFunctions.ErrMessage(cConfig.ConfigErrMessage);
            }

            FindRows = null;
        }
Example #2
0
        private void mnuEditAdd_Click(object sender, EventArgs e)
        {
            frmAdd fAdd = new frmAdd();

            fAdd.ShowDialog();

            if (fAdd.bSuccess)
            {
                cConfig.dsConfig.Tables["Notes"].Rows.Add(null,
                                                          fAdd.stCaption, fAdd.stNote);
            }

            if (!cConfig.SaveConfig())
            {
                CommonFunctions.ErrMessage(cConfig.ConfigErrMessage);
            }

            FindRows = null;
        }