Example #1
0
        protected override void New()
        {
            if (TestRight("新增") == false)
            {
                return;
            }
            base.New();
            frmEditSupplier myEditSupplier = new frmEditSupplier();

            myEditSupplier.strType = tvType.SelectedNode.Tag.ToString();
            myEditSupplier.New();
            if (myEditSupplier.ShowDialog() == DialogResult.OK)
            {
                BindData();
            }
            myEditSupplier.Dispose();
        }
Example #2
0
        protected override void Edit()
        {
            if (TestRight("编辑") == false)
            {
                return;
            }
            if (gvBase.FocusedRowHandle < 0)
            {
                return;
            }
            base.Edit();
            DataRow         dr             = gvBase.GetDataRow(gvBase.FocusedRowHandle);
            frmEditSupplier myEditSupplier = new frmEditSupplier();

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