Exemplo n.º 1
0
        /// <summary>
        /// 新增职责
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsbNewDuty_Click(object sender, EventArgs e)
        {
            DutyInfo di = new DutyInfo();

            if (di.ShowDialog() == DialogResult.OK)
            {
                BindDuty();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑职责
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsbEdit_Click(object sender, EventArgs e)
        {
            DutyInfo di = new DutyInfo();

            //di.Owner = this;
            //di.DrDuty=((DataView)dgvDutyInfo.DataSource).Rows[dgvDutyInfo.CurrentRow.Index];


            di.DrDuty = ((DataView)dgvDutyInfo.DataSource)[dgvDutyInfo.CurrentRow.Index].Row;
            if (di.ShowDialog() == DialogResult.OK)
            {
                BindDuty();
            }
        }