Пример #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            UsrManage _roleMge = new UsrManage();

            _roleMge.Edit = "ADD";
            if (_roleMge.ShowDialog() != DialogResult.OK)
            {
                ResetView();
            }
        }
Пример #2
0
 private void BtnUpd_Click(object sender, EventArgs e)
 {
     if (this.dataGridView1 != null && this.dataGridView1.Rows.Count > 0)
     {
         if (dataGridView1.CurrentRow != null)
         {
             string          _Usr_id = "";
             DataGridViewRow _dr     = this.dataGridView1.Rows[dataGridView1.CurrentRow.Index];
             if (_dr != null)
             {
                 _Usr_id = string.IsNullOrEmpty((_dr.Cells["Usr_Id"].Value.ToString()).ToString()) ? "" : (_dr.Cells["Usr_Id"].Value.ToString()).ToString();
             }
             UsrManage _roleMge = new UsrManage();
             _roleMge.Edit   = "UPD";
             _roleMge.Usr_id = _Usr_id;
             if (_roleMge.ShowDialog() != DialogResult.OK)
             {
                 ResetView();
             }
         }
     }
 }