Пример #1
0
 static void dtgModules_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         VmgPortal.WebControls.ButtonRoleDelete btnDeleteModule = (VmgPortal.WebControls.ButtonRoleDelete)e.Row.FindControl("btnDeleteModule");
         btnDeleteModule.Attributes.Add("onclick", MiscUtility.MSG_DELETE_CONFIRM);
     }
 }
 protected void dtgModuleControls_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         VmgPortal.WebControls.ButtonRoleDelete btnDeleteControl = (VmgPortal.WebControls.ButtonRoleDelete)e.Row.FindControl("btnDeleteControl");
         btnDeleteControl.Attributes.Add("onclick", MiscUtility.MSG_DELETE_CONFIRM);
         DataRowView row            = (DataRowView)e.Row.DataItem;
         Label       lblControlPath = (Label)e.Row.FindControl("lblControlPath");
         lblControlPath.Text = ConvertUtility.ToString(row["ControlPath"]).Replace(txtModuleFolder.Text.Trim(), "/");
     }
 }
Пример #3
0
        protected void dtgRoles_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                VmgPortal.WebControls.ButtonRoleDelete btnDeleteRole = (VmgPortal.WebControls.ButtonRoleDelete)e.Row.FindControl("btnDeleteRole");
                btnDeleteRole.Attributes.Add("onclick", MiscUtility.MSG_DELETE_CONFIRM);

                if (e.Row.Cells[0].Text == "Default")
                {
                    e.Row.Visible = CurrentUser.IsSuperAdmin;
                }
            }
        }