Esempio n. 1
0
        /// <summary>
        /// 重写基类新增方法
        /// </summary>
        protected override void New()
        {
            if (TestRight("新增") == false)
            {
                return;
            }
            base.New();
            frmEditClient myEditClient = new frmEditClient();

            myEditClient.strType = tvType.SelectedNode.Tag.ToString();
            myEditClient.New();
            if (myEditClient.ShowDialog() == DialogResult.OK)
            {
                BindData();
            }
            myEditClient.Dispose();
        }
Esempio n. 2
0
        /// <summary>
        /// 重写基类编辑方法
        /// </summary>
        protected override void Edit()
        {
            if (TestRight("编辑") == false)
            {
                return;
            }
            if (gvBase.FocusedRowHandle < 0)
            {
                return;
            }
            base.Edit();
            DataRow       dr           = gvBase.GetDataRow(gvBase.FocusedRowHandle);
            frmEditClient myEditClient = new frmEditClient();

            myEditClient.Edit(dr["F_ID"].ToString());
            if (myEditClient.ShowDialog() == DialogResult.OK)
            {
                BindData();
            }
            myEditClient.Dispose();
        }