public void GetDOAA1Data(int DataCaptYM, string MenuID)
        {
            FormsRepository formsRepository = new FormsRepository();

            DataCaptYM = SessionManager.DataCaptYR > 0 ? SessionManager.DataCaptYR : (DataCaptYM > 0 ? DataCaptYM : 0);
            if (MenuID == DataAccess.Enum.Menu.DOAA.ToString())
            {
                this.info = formsRepository.GetDOAA1FormDataByID(DataCaptYM, SessionManager.DeptID, MenuID);
                if (info == null)
                {
                    info                = new stInfo();
                    info.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    info.DataStatusName = "Data Entry Started by Operator";
                    info.DataCaptYM     = DataCaptYM;
                    info.DeptName       = info.DeptID = SessionManager.DeptID;
                }
            }
            else if (MenuID == DataAccess.Enum.Menu.ADIR.ToString() || MenuID == DataAccess.Enum.Menu.DOSW.ToString())
            {
                this.info2 = formsRepository.GetADIRFormDataByID(DataCaptYM, SessionManager.DeptID, MenuID);
                if (info2 == null)
                {
                    info2                = new stInfo2();
                    info2.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    info2.DataStatusName = "Data Entry Started by Operator";
                    info2.DataCaptYM     = DataCaptYM;
                    info2.DeptName       = info2.DeptID = SessionManager.DeptID;
                }
            }
            else if (MenuID == DataAccess.Enum.Menu.LIBFORM.ToString())
            {
                this.libInfo = formsRepository.GetLibFormDataByID(DataCaptYM, SessionManager.DeptID, MenuID);
                if (libInfo == null)
                {
                    libInfo                = new LibInfo();
                    libInfo.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    libInfo.DataStatusName = "Data Entry Started by Operator";
                    libInfo.DataCaptYM     = DataCaptYM;
                    libInfo.DeptName       = libInfo.DeptID = SessionManager.DeptID;
                }
            }

            RankMesg rankmesg = FormCommonMethods.GetCurrentRankMesg();

            this.rankmsg = rankmesg.Message;
        }
Esempio n. 2
0
        public void GetMultiDataByMenuID(int dataCaptYM, string MenuID, string empDept = "")
        {
            FormsRepository formsRepository = new FormsRepository();

            dataCaptYM = SessionManager.DataCaptYR > 0 ? SessionManager.DataCaptYR : (dataCaptYM > 0 ? dataCaptYM : 0);
            if (MenuID == DataAccess.Enum.Menu.DOFA.ToString())
            {
                dofaViewModel = new DofaViewModel();
                dofaViewModel.GetDOFAData(dataCaptYM, empDept);
            }
            else if (MenuID == DataAccess.Enum.Menu.SRICFA.ToString())
            {
                sricFAViewModel = new SricFAViewModel();
                sricFAViewModel.GetSRICFAData(dataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.SRIC.ToString())
            {
                sricDeptViewModel = new SricDeptViewModel();
                sricDeptViewModel.GetSRICData(dataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.DOFAPEER.ToString())
            {
                dofaPeerViewModel = new DofaPeerViewModel();
                dofaPeerViewModel.GetDofaPeerData(dataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.TPDEPT.ToString())
            {
                tpDeptViewModel = new TPDeptViewModel();
                tpDeptViewModel.GetTPDeptData(dataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.INFRA.ToString())
            {
                infraViewModel = new InfraViewModel();
                infraViewModel.GetInfraData(dataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.DFNP.ToString())
            {
                dfnpViewModel = new DFNPViewModel();
                dfnpViewModel.GetDFNPData(dataCaptYM);
                dfnpViewModel.finInfo.EmpDept = SessionManager.EmpDeptID;
            }

            RankMesg rankmesg = FormCommonMethods.GetCurrentRankMesg();

            this.rankmsg = rankmesg.Message;
        }
Esempio n. 3
0
        public void GetDOAA1Data(int DataCaptYM, string MenuID)
        {
            FormsRepository formsRepository = new FormsRepository();

            DataCaptYM = SessionManager.DataCaptYR > 0 ? SessionManager.DataCaptYR : (DataCaptYM > 0 ? DataCaptYM : 0);
            if (MenuID == DataAccess.Enum.Menu.DOAA.ToString())
            {
                string deptID = string.IsNullOrEmpty(SessionManager.EmpDeptID) ? SessionManager.DeptID : SessionManager.EmpDeptID;
                this.info = formsRepository.GetDOAA1FormDataByID(DataCaptYM, deptID, MenuID);
                if (info == null)
                {
                    info                = new stInfo();
                    info.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    info.DataStatusName = (DataAccess.Enum.DataStatus.DataEntryStartedbyOperator).GetStringValue();
                    info.DataCaptYM     = DataCaptYM;
                    info.DeptName       = info.DeptID = SessionManager.DeptID;
                }
                info.EmpDept = SessionManager.EmpDeptID;
            }
            else if (MenuID == DataAccess.Enum.Menu.ADIR.ToString() || MenuID == DataAccess.Enum.Menu.DOSW.ToString())
            {
                this.info2 = formsRepository.GetADIRFormDataByID(DataCaptYM, SessionManager.DeptID, MenuID);
                if (info2 == null)
                {
                    info2                = new stInfo2();
                    info2.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    info2.DataStatusName = (DataAccess.Enum.DataStatus.DataEntryStartedbyOperator).GetStringValue();
                    info2.DataCaptYM     = DataCaptYM;
                    info2.DeptName       = info2.DeptID = SessionManager.DeptID;
                }
            }
            else if (MenuID == DataAccess.Enum.Menu.LIBFORM.ToString())
            {
                this.libInfo = formsRepository.GetLibFormDataByID(DataCaptYM, SessionManager.DeptID, MenuID);
                if (libInfo == null)
                {
                    libInfo                = new LibInfo();
                    libInfo.DataStatus     = (int)DataAccess.Enum.DataStatus.DataEntryStartedbyOperator;
                    libInfo.DataStatusName = (DataAccess.Enum.DataStatus.DataEntryStartedbyOperator).GetStringValue();
                    libInfo.DataCaptYM     = DataCaptYM;
                    libInfo.DeptName       = libInfo.DeptID = SessionManager.DeptID;
                }
            }
            else if (MenuID == DataAccess.Enum.Menu.DOFA.ToString())
            {
                dofaViewModel = new DofaViewModel();
                dofaViewModel.GetDOFAData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.SRICFA.ToString())
            {
                sricFAViewModel = new SricFAViewModel();
                sricFAViewModel.GetSRICFAData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.SRIC.ToString())
            {
                sricDeptViewModel = new SricDeptViewModel();
                sricDeptViewModel.GetSRICData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.DOFAPEER.ToString())
            {
                dofaPeerViewModel = new DofaPeerViewModel();
                dofaPeerViewModel.GetDofaPeerData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.TPDEPT.ToString())
            {
                tpDeptViewModel = new TPDeptViewModel();
                tpDeptViewModel.GetTPDeptData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.INFRA.ToString())
            {
                infraViewModel = new InfraViewModel();
                infraViewModel.GetInfraData(DataCaptYM);
            }
            else if (MenuID == DataAccess.Enum.Menu.DFNP.ToString())
            {
                dfnpViewModel = new DFNPViewModel();
                dfnpViewModel.GetDFNPData(DataCaptYM);
                dfnpViewModel.finInfo.EmpDept = SessionManager.EmpDeptID;
            }

            RankMesg rankmesg = FormCommonMethods.GetCurrentRankMesg();

            this.rankmsg = rankmesg.Message;
        }