Beispiel #1
0
        private void sbAdd_Click(object sender, EventArgs e)
        {
            DataLib.sysClass myClass = new DataLib.sysClass();
            if (myClass.TestRight("frmEditUser") == false)
            {
                return;
            }
            frmEditUser myEditUser = new frmEditUser();

            myEditUser.DataBind("");
            if (myEditUser.ShowDialog() == DialogResult.OK)
            {
                DataBind();
            }
            myEditUser.Dispose();
        }
Beispiel #2
0
        private void sbEdit_Click(object sender, EventArgs e)
        {
            DataLib.sysClass myClass = new DataLib.sysClass();
            if (myClass.TestRight("frmEditUser") == false)
            {
                return;
            }
            if (gvMain.FocusedRowHandle < 0)
            {
                return;
            }
            DataRow     dr         = gvMain.GetDataRow(gvMain.FocusedRowHandle);
            frmEditUser myEditUser = new frmEditUser();

            myEditUser.DataBind(dr["F_ID"].ToString());
            if (myEditUser.ShowDialog() == DialogResult.OK)
            {
                DataBind();
            }
            myEditUser.Dispose();
        }