using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KstCMS.KstCMS_Manager.SystemSet.Users.role
{
    public partial class RoleList : KstCmsBase.WebPage.ValidationPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            repMain.ItemCommand += new RepeaterCommandEventHandler(repMain_ItemCommand);

            if (!IsPostBack)
                Bind();

        }

        void repMain_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            // System.Threading.Thread.Sleep(500);
            KstCmsBase.DAL.Role.Delete(Convert.ToInt32(e.CommandName.ToString()));
           
            Bind();
        }


        private void Bind()
        {
            repMain.DataSource = KstCmsBase.DAL.Role.Get_RoleList();
            repMain.DataBind();
        }
    }
}