Пример #1
0
        protected void AdminGridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "DelPPL")
            {
                int          index     = Convert.ToInt32(e.CommandArgument.ToString());
                DataTable    dtppl     = AdminGridView.DataSource as DataTable;
                string       person_id = dtppl.Rows[index]["EMPLOYEE_id"].ToString();
                OracleQuery2 cc2       = new OracleQuery2();
                cc2.DeleteAdmin(person_id);
                BindGrid();
            }

            else if (e.CommandName == "EditPPL")
            {
                int       index      = Convert.ToInt32(e.CommandArgument.ToString());
                DataTable dtppl      = AdminGridView.DataSource as DataTable;
                string    EmployeeID = dtppl.Rows[index]["EMPLOYEE_id"].ToString();
                string    isadmin    = dtppl.Rows[index]["IS_ADMIN"].ToString();
                string    Name       = dtppl.Rows[index]["FULLNAMETH"].ToString();
                string    posname    = dtppl.Rows[index]["posname"].ToString();
                string    unitname   = dtppl.Rows[index]["unitname"].ToString();
                EmployeeIDLabel.Text = EmployeeID;
                NameLabel.Text       = Name;
                posnameLabel.Text    = posname;
                unitnameLabel.Text   = unitname;
                resultppl.Visible    = true;
                SavePPL.Enabled      = true;
                grpPanel.Visible     = true;
                AddPPLPanel.Visible  = true;
                HeadModal.Visible    = false;
                IsAdminChk.Checked   = isadmin == "ADMIN";
                UpdatePPL.Visible    = true;
                SavePPL.Visible      = false;
            }
        }