private void updateSecurity()
        {
            if (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miCapturePlanningProtocol_HPASCapturePlanningProtocol_MinewareSystemsHarmonyPAS.ItemID) == 0 ||
                TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miCapturePlanningProtocol_HPASCapturePlanningProtocol_MinewareSystemsHarmonyPAS.ItemID) == 1)
            {
                btnSave.Enabled       = false;
                btnUnlockData.Enabled = false;
                btnLockData.Enabled   = false;
            }
            else
            {
                switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miUnlockPlanningProtcol_HPASPlanProtUnlock_MinewareSystemsHarmonyPAS.ItemID))
                {
                case 0:
                    btnUnlockData.Enabled = false;
                    break;

                case 1:
                    btnUnlockData.Enabled = false;
                    break;

                case 2:
                    btnUnlockData.Enabled = true;
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void updateSecurity()
        {
            switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miRevisedPlanningSecurity_HPASRevisedPlanningSecurity_MinewareSystemsHarmonyPAS.ItemID))
            {
            case 0:
            case 1:
                btnAdd.Enabled  = false;
                btnDel.Enabled  = false;
                btnEdit.Enabled = false;

                break;

            case 2:
                btnAdd.Enabled  = true;
                btnDel.Enabled  = true;
                btnEdit.Enabled = true;
                break;
            }
        }
 private void updateSecurity()
 {
     if (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAuthorisePlan_HPASLockPlanningAuthorise_MinewareSystemsHarmonyPAS.ItemID) == 2)
     {
         btnSave.Enabled = true;
         gcLocked.OptionsColumn.AllowEdit    = true;
         gcLocked.OptionsColumn.ReadOnly     = false;
         gcAuthorize.OptionsColumn.AllowEdit = true;
         gcAuthorize.OptionsColumn.ReadOnly  = false;
     }
     else
     {
         btnSave.Enabled = false;
         gcLocked.OptionsColumn.AllowEdit    = false;
         gcLocked.OptionsColumn.ReadOnly     = true;
         gcAuthorize.OptionsColumn.AllowEdit = false;
         gcAuthorize.OptionsColumn.ReadOnly  = true;
     }
 }
Ejemplo n.º 4
0
        public TileItem getMainMenuItem()
        {
            int theLevel = TUserInfo.theSecurityLevel(TMinewasteGlobal.MinewasteMenuStructure.miMinewaste_Minewaste_MinewareSystemsMinewaste.ItemID);

            if (theLevel > 0)
            {
                var theResult     = new TileItem();
                var imageServices = Properties.Resources.IMS48x48;
                theResult.Text          = "<size=20>Minewaste</size>";
                theResult.TextAlignment = TileItemContentAlignment.TopLeft;
                theResult.AppearanceItem.Normal.BackColor   = Color.FromArgb(255, 0, 0);
                theResult.AppearanceItem.Normal.BackColor2  = Color.FromArgb(255, 0, 0);
                theResult.AppearanceItem.Normal.BorderColor = Color.Transparent;
                theResult.ImageAlignment = TileItemContentAlignment.BottomRight;
                theResult.Image          = imageServices;
                theResult.Tag            = MinewasteResource.systemTag;
                theResult.ItemSize       = TileItemSize.Wide;
                return(theResult);
            }


            //int theLevel2 = TUserInfo.theSecurityLevel(THarmonyPASGlobal.SafetyMenuStruct.miHRM_SAF_MinewareSystemsHarmonyHRM.ItemID);
            //if (theLevel2 > 0)
            //{
            //    var theResult2 = new TileItem();
            //    var imageServices2 = resHarmonyPAS.SafetyStart48x48;
            //    theResult2.Text = "<size=20>Human Resources Management</size>";
            //    theResult2.TextAlignment = TileItemContentAlignment.TopLeft;
            //    theResult2.AppearanceItem.Normal.BackColor = Color.FromArgb(285, 0, 0);
            //    theResult2.AppearanceItem.Normal.BackColor2 = Color.FromArgb(285, 0, 0);
            //    theResult2.AppearanceItem.Normal.BorderColor = Color.Transparent;
            //    theResult2.ImageAlignment = TileItemContentAlignment.BottomRight;
            //    theResult2.Image = imageServices2;
            //    theResult2.Tag = resHarmonyPAS.systemTag;
            //    theResult2.ItemSize = TileItemSize.Wide;
            //    return theResult2;
            //}
            else
            {
                return(null);
            }
        }
Ejemplo n.º 5
0
        public DevExpress.XtraEditors.TileItem getMainMenuItem()
        {
            int theLevel = TUserInfo.theSecurityLevel(THarmonyPASGlobal.HarmonyPasMenuStructure.miPAS_HPAS_MinewareSystemsHarmonyPAS.ItemID);

            if (theLevel > 0)
            {
                var theResult     = new TileItem();
                var imageServices = SafetyResource.SafetyStart48x48;
                theResult.Text          = "<size=20>HRM</size>";
                theResult.TextAlignment = TileItemContentAlignment.TopLeft;
                theResult.AppearanceItem.Normal.BackColor   = Color.FromArgb(255, 140, 0);
                theResult.AppearanceItem.Normal.BackColor2  = Color.FromArgb(255, 165, 0);
                theResult.AppearanceItem.Normal.BorderColor = Color.Transparent;
                theResult.ImageAlignment = TileItemContentAlignment.BottomRight;
                theResult.Image          = imageServices;
                theResult.Tag            = SafetyResource.systemTag;
                theResult.ItemSize       = TileItemSize.Wide;
                return(theResult);
            }
            else
            {
                return(null);
            }
        }
        public TileItem getMainMenuItem()
        {
            int theLevel = TUserInfo.theSecurityLevel(TProductionGlobal.WPASMenuStructure.miPAS_HPAS_MinewareSystemsHarmonyPAS.ItemID);

            if (theLevel > 0)
            {
                var theResult     = new TileItem();
                var imageServices = resWPAS.ProductionStart48x48;
                theResult.Text          = "<size=20>PAS</size>";
                theResult.TextAlignment = TileItemContentAlignment.TopLeft;
                theResult.AppearanceItem.Normal.BackColor   = Color.FromArgb(255, 0, 0);
                theResult.AppearanceItem.Normal.BackColor2  = Color.FromArgb(255, 0, 0);
                theResult.AppearanceItem.Normal.BorderColor = Color.Transparent;
                theResult.ImageAlignment = TileItemContentAlignment.BottomRight;
                theResult.Image          = imageServices;
                theResult.Tag            = resWPAS.systemTag;
                theResult.ItemSize       = TileItemSize.Wide;
                return(theResult);
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// Load planning data from DB
        /// </summary>
        public void LoadPlanning()
        {
            MWDataManager.clsDataAccess _TestData = new MWDataManager.clsDataAccess();
            _TestData.ConnectionString   = TConnections.GetConnectionString(systemDBTag, UserCurrentInfo.Connection);
            _TestData.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement;
            _TestData.queryReturnType    = MWDataManager.ReturnType.DataTable;

            _TestData.SqlStatement = "SELECT *,PP.ReefSQM,WP.ReefWaste FROM dbo.PLANMONTH PP inner join SECTION_COMPLETE SC ON \n" +
                                     "   PP.Prodmonth =  SC.PRODMONTH AND \n" +
                                     "   PP.Sectionid =  SC.Sectionid \n" +
                                     "   inner join WORKPLACE WP ON \n" +
                                     "   PP.Workplaceid=WP.WORKPLACEID  \n" +
                                     " WHERE PP.Activity =  " + planningSettings.ActivityID + "\n" +
                                     " AND  SC.Sectionid_2 = '" + planningSettings.MOSectionID + "'" + " \n" +
                                     " and PP.Prodmonth = " + planningSettings.ProdMonth;
            var theResult = _TestData.ExecuteInstruction();

            //planningCycle.LoadPlanningCycleData(tblPlanningData);

            if (theResult.success)
            {
                if (_TestData.ResultsDataTable.Rows.Count == 0 && TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAllowImportPreviousMonth_HPASPlanningWPImportPreviousMonth_MinewareSystemsHarmonyPAS.ItemID) == 2)
                {
                    var canReload = MessageBox.Show("You have not yet planned for this month. Do you want to load your plans from last month, to form a basis for this month's plan? ", "Unlock Data", MessageBoxButtons.YesNo);
                    if (canReload == DialogResult.No)
                    {
                        GetPlanningData();
                        tblPlanningData.Rows.Clear();
                        _TestData = null;
                    }
                    else
                    {
                        ImportPreviousMonthData();
                        GetPlanningData();
                    }
                }
                else
                {
                    GetPlanningData();
                    _TestData = null;
                }
            }


            MWDataManager.clsDataAccess _CycleCodes = new MWDataManager.clsDataAccess();
            _CycleCodes.ConnectionString   = TConnections.GetConnectionString(systemDBTag, UserCurrentInfo.Connection);
            _CycleCodes.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement;
            _CycleCodes.queryReturnType    = MWDataManager.ReturnType.DataTable;
            sb.Clear();
            sb.AppendLine("SELECT [CycleCode]");
            sb.AppendLine(",[Description]");
            sb.AppendLine("      ,[CanBlast],DayCallPercentage");
            sb.AppendLine("FROM [PAS_DNK_Syncromine].[dbo].[CODE_CYCLE]");
            sb.AppendLine("where Stoping = 'Y'");

            _CycleCodes.SqlStatement = sb.ToString();
            var CycleCodesResult = _CycleCodes.ExecuteInstruction();

            if (_CycleCodes.ResultsDataTable != null)
            {
                planningCycle.SetCycleCodes(_CycleCodes.ResultsDataTable);
            }
        }
        private void ucAuthLockPlan_Load(object sender, EventArgs e)
        {
            switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAuthorisePlan_HPASLockPlanningAuthorise_MinewareSystemsHarmonyPAS.ItemID))
            {
            case 0:
            case 1:
                gcAuthorize.OptionsColumn.AllowEdit     = false;
                gcAuthorize.OptionsColumn.ReadOnly      = true;
                gcDevAuth.OptionsColumn.AllowEdit       = false;
                gcDevAuth.OptionsColumn.ReadOnly        = true;
                gcSweepVampAuth.OptionsColumn.AllowEdit = false;
                gcSweepVampAuth.OptionsColumn.ReadOnly  = true;
                gcSundryAuth.OptionsColumn.AllowEdit    = false;
                gcSundryAuth.OptionsColumn.ReadOnly     = true;
                break;

            case 2:
                gcAuthorize.OptionsColumn.AllowEdit     = true;
                gcAuthorize.OptionsColumn.ReadOnly      = false;
                gcDevAuth.OptionsColumn.AllowEdit       = true;
                gcDevAuth.OptionsColumn.ReadOnly        = false;
                gcSweepVampAuth.OptionsColumn.AllowEdit = true;
                gcSweepVampAuth.OptionsColumn.ReadOnly  = false;
                gcSundryAuth.OptionsColumn.AllowEdit    = true;
                gcSundryAuth.OptionsColumn.ReadOnly     = false;
                break;
            }

            switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAuthorisePlan_HPASLockPlanningAuthorise_MinewareSystemsHarmonyPAS.ItemID))
            {
            case 0:
            case 1:
                gcLocked.OptionsColumn.AllowEdit        = false;
                gcLock.OptionsColumn.ReadOnly           = true;
                gcDevLocked.OptionsColumn.AllowEdit     = false;
                gcDevLocked.OptionsColumn.ReadOnly      = true;
                gcSweepCampLock.OptionsColumn.AllowEdit = false;
                gcSweepCampLock.OptionsColumn.ReadOnly  = true;
                gcLKD.OptionsColumn.AllowEdit           = false;
                gcLKD.OptionsColumn.ReadOnly            = true;
                break;

            case 2:
                gcLocked.OptionsColumn.AllowEdit        = true;
                gcLock.OptionsColumn.ReadOnly           = false;
                gcDevLocked.OptionsColumn.AllowEdit     = true;
                gcDevLocked.OptionsColumn.ReadOnly      = false;
                gcSweepCampLock.OptionsColumn.AllowEdit = true;
                gcSweepCampLock.OptionsColumn.ReadOnly  = false;
                gcLKD.OptionsColumn.AllowEdit           = true;
                gcLKD.OptionsColumn.ReadOnly            = false;

                break;
            }

            Stopping.BestFitColumns();
            //CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer();
            //BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable;

            //BMEBL.SetsystemDBTag = this.theSystemDBTag;
            //BMEBL.SetUserCurrentInfo = this.UserCurrentInfo;

            _clsAuthLockPlanData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection);

            updateSections(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth);

            DataTable dtActivity = _clsAuthLockPlanData.GetActivity();

            editActivity.DataSource    = dtActivity;
            editActivity.ValueMember   = "Code";
            editActivity.DisplayMember = "Desc";

            productionmonth1.EditValue            = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString());
            gcTopend.ColumnEdit.EditValueChanged += gcTopend_ColumnEdit_EditValueChanged;
            gcLKD.ColumnEdit.EditValueChanged    += gcLKD_ColumnEdit_EditValueChanged;
        }