예제 #1
0
        private void LimmitManager_Load(object sender, EventArgs e)
        {
            this.dicFuncLimitPairs    = new Dictionary <string, int>();
            this.dicOperateLimitPairs = new Dictionary <string, int>();
            this.funLimitManager      = new FuncLimitManager();
            this.operatLimitManager   = new OperatLimitManager();
            this.roleManager          = new TRoleManager();
            Init();

            this.btn_cancel.Click += Btn_cancel_Click;
            this.btn_ok.Click     += Btn_ok_Click;
            this.checkAllFunc.CheckStateChanged    += CheckAllFunc_CheckStateChanged;
            this.checkAllOperat.CheckStateChanged  += CheckAllOperat_CheckStateChanged;
            this.cob_roleList.SelectedIndexChanged += Cob_roleList_SelectedIndexChanged;
        }
        public static long InsertFuncLimitPID()
        {
            long             id         = -1;
            FuncLimitManager objManager = new FuncLimitManager();
            var dt = objManager.GetDataSetByWhere("order by ID DESC limit 1").Tables[0];

            if (dt.Rows.Count < 1)
            {
                return(0);
            }
            if (long.TryParse(dt.Rows[0]["ID"].ToString(), out id))
            {
                return(id + 1);
            }
            return(id);
        }