Example #1
0
        private void sbAdd_Click(object sender, EventArgs e)
        {
            frmEditAssist myEditAssist = new frmEditAssist();

            myEditAssist.strType = cbType.Text;
            if (myEditAssist.ShowDialog() == DialogResult.OK)
            {
                DataBind(cbType.Text);
            }
            myEditAssist.Dispose();
        }
Example #2
0
        private void sbEdit_Click(object sender, EventArgs e)
        {
            if (gvAssist.FocusedRowHandle < 0)
            {
                return;
            }
            frmEditAssist myEditAssist = new frmEditAssist();

            myEditAssist.strType = cbType.Text;
            myEditAssist.strID   = gvAssist.GetRowCellValue(gvAssist.FocusedRowHandle, "F_ID").ToString();
            myEditAssist.Edit(gvAssist.GetRowCellValue(gvAssist.FocusedRowHandle, "F_Name").ToString());
            if (myEditAssist.ShowDialog() == DialogResult.OK)
            {
                DataBind(cbType.Text);
            }
            myEditAssist.Dispose();
        }