Exemplo n.º 1
0
        protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
        {
            //User user = e.DataItem as User;

            //// 不能删除超级管理员
            //if (user.Name == "admin")
            //{
            //FineUI.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUI.LinkButtonField;
            //    deleteField.Enabled = false;
            //    deleteField.ToolTip = "不能删除超级管理员!";
            //}
        }
Exemplo n.º 2
0
        protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
        {
            users user = e.DataItem as users;

            // 不能删除超级管理员
            if (user.Name == "administrator")
            {
                FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField;
                deleteField.Enabled = false;
                deleteField.ToolTip = "不能删除超级管理员!";
            }
        }
Exemplo n.º 3
0
        // 超级管理员(admin)不可编辑,也不会检索出来
        protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
        {
            Infobasis.Data.DataEntity.User user = e.DataItem as Infobasis.Data.DataEntity.User;

            FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField;

            // 不能删除超级管理员
            if (user.IsClientAdmin)
            {
                deleteField.Enabled = false;
                deleteField.ToolTip = "不能删除管理员!";
            }
            else
            {
                deleteField.Enabled = true;
                deleteField.ToolTip = "删除";
            }
        }
Exemplo n.º 4
0
        // 超级管理员(admin)不可编辑,也不会检索出来
        protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
        {
            Infobasis.Data.DataEntity.Company company = e.DataItem as Infobasis.Data.DataEntity.Company;

            FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField;

            // 不能删除超级管理员
            if (company.IsSystemAdminCompany.HasValue && company.IsSystemAdminCompany.Value)
            {
                deleteField.Enabled = false;
                deleteField.ToolTip = "不能删除此数据!";
            }
            else
            {
                deleteField.Enabled = true;
                deleteField.ToolTip = "删除";
            }
        }
Exemplo n.º 5
0
        // 超级管理员(admin)不可编辑,也不会检索出来
        protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
        {
            Infobasis.Data.DataEntity.BudgetTemplateData data = e.DataItem as Infobasis.Data.DataEntity.BudgetTemplateData;

            FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField;
        }
Exemplo n.º 6
0
 // 超级管理员(admin)不可编辑,也不会检索出来
 protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e)
 {
     Infobasis.Data.DataEntity.User user = e.DataItem as Infobasis.Data.DataEntity.User;
 }