Beispiel #1
0
        private void InitFuncState()
        {
            OperatLimitManager operatLimitManager = new OperatLimitManager();
            var data = operatLimitManager.GetDataSetByWhere($"where UserRole='{LocalLogin.currentUserType}'").Tables[0];

            if (data.Rows.Count > 0)
            {
                foreach (DataRow dr in data.Rows)
                {
                    this.tool_likeQuery.Visible        = ConvertDec2State(dr["OperatorRecord_query"].ToString());
                    this.tool_deleteSignalData.Visible = ConvertDec2State(dr["OperatorRecord_del"].ToString());
                    this.tool_deleteAllData.Visible    = ConvertDec2State(dr["OperatorRecord_del"].ToString());
                    this.tool_export.Visible           = ConvertDec2State(dr["OperatorRecord_export"].ToString());
                }
            }
        }
        public static long InsertOperateLimitPID()
        {
            long id = -1;
            OperatLimitManager objManager = new OperatLimitManager();
            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);
        }
        private void InitFuncState()
        {
            OperatLimitManager operatLimitManager = new OperatLimitManager();
            var data = operatLimitManager.GetDataSetByWhere($"where UserRole='{LocalLogin.currentUserType}'").Tables[0];

            if (data.Rows.Count > 0)
            {
                foreach (DataRow dr in data.Rows)
                {
                    this.tool_query.Visible  = ConvertDec2State(dr["SwitchStandLib_query"].ToString());
                    this.tool_add.Visible    = ConvertDec2State(dr["SwitchStandLib_add"].ToString());
                    this.tool_delete.Visible = ConvertDec2State(dr["SwitchStandLib_del"].ToString());
                    this.tool_edit.Visible   = ConvertDec2State(dr["SwitchStandLib_edit"].ToString());
                    this.tool_export.Visible = ConvertDec2State(dr["SwitchStandLib_export"].ToString());
                }
            }
        }
Beispiel #4
0
        private void InitFuncState()
        {
            OperatLimitManager operatLimitManager = new OperatLimitManager();
            var data = operatLimitManager.GetDataSetByWhere($"where UserRole='{LocalLogin.currentUserType}'").Tables[0];

            if (data.Rows.Count > 0)
            {
                foreach (DataRow dr in data.Rows)
                {
                    this.menu_deleteData.Visibility = ConvertDec2EleVisState(dr["Project_del"].ToString());
                    //this.menu_eqlQuery.Visibility = ConvertDec2EleVisState(dr["HistoryTestData_query"].ToString());
                    this.menu_likeQuery.Visibility = ConvertDec2EleVisState(dr["HistoryTestData_query"].ToString());
                    this.menu_detail.Visibility    = ConvertDec2EleVisState(dr["HistoryTestData_query"].ToString());
                    this.menu_export.Visibility    = ConvertDec2EleVisState(dr["HistoryTestData_export"].ToString());
                }
            }
        }
        private void InitFuncState()
        {
            OperatLimitManager operatLimitManager = new OperatLimitManager();
            var data = operatLimitManager.GetDataSetByWhere($"where UserRole='{LocalLogin.currentUserType}'").Tables[0];

            if (data.Rows.Count > 0)
            {
                foreach (DataRow dr in data.Rows)
                {
                    this.btn_deleteProject.Visibility = ConvertDec2EleVisState(dr["Project_del"].ToString());
                    this.btn_editProject.Visibility   = ConvertDec2EleVisState(dr["project_edit"].ToString());

                    //(dr["Project_query"].ToString());
                    //(dr["Project_add"].ToString());
                    //(dr["Project_del"].ToString());
                    //(dr["project_edit"].ToString());
                }
            }
        }