Beispiel #1
0
        /// <summary>
        /// SetAppTableRepCancel
        ///     : 상신취소 처리를 위한 테이블 수정처리
        /// </summary>
        /// <param name="asAppRefID"></param>
        /// <returns></returns>
        public int SetAppTableRepCancel(string asAppRefID)
        {
            int iRet = 0;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                iRet = dac.SetPrcRepCancel(asAppRefID);

                if (iRet <= 0)
                {
                    return(0);
                }

                iRet = dac.SetInfoRepCancel(asAppRefID);

                if (iRet <= 0)
                {
                    return(0);
                }

                scope.Complete();
            }

            return(iRet);
        }
Beispiel #2
0
        /// <summary>
        /// SetAppTableCancel
        ///     : 승인취소 처리를 위한 테이블 수정처리
        /// </summary>
        /// <param name="asRemark"></param>
        /// <param name="asAppRefID"></param>
        /// <param name="asCurStep"></param>
        /// <param name="asTermRefID"></param>
        /// <returns></returns>
        public int SetAppTableCancel(string asRemark, string asAppRefID, string asCurStep, string asTermRefID)
        {
            int iRet = 0;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                iRet = dac.SetPrcCancel(asRemark, asAppRefID, asCurStep);

                if (iRet <= 0)
                {
                    return(0);
                }

                iRet = dac.SetInfoCancel(asAppRefID, asTermRefID);

                if (iRet <= 0)
                {
                    return(0);
                }



                scope.Complete();
            }

            return(iRet);
        }
Beispiel #3
0
        /// <summary>
        /// GetSearchData
        ///     : 결재승인 정보 추출
        /// </summary>
        /// <param name="asEmpID"></param>
        /// <returns></returns>
        public DataSet GetSearchData(string asEmpID, string asAppGubun, string asEstTerm, string asAppStatus, bool bIsRep)
        {
            DataSet lDS = new DataSet();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                lDS = dac.GetSearchData(asEmpID, asAppGubun, asEstTerm, asAppStatus, bIsRep);

                scope.Complete();
            }

            return(lDS);
        }
Beispiel #4
0
        /// <summary>
        /// GetDDLEstTerm
        ///     : 평가 기간 드롭다운리스트 추출
        /// </summary>
        /// <returns></returns>
        public DataSet GetDDLEstTerm()
        {
            DataSet lDS = new DataSet();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                lDS = dac.GetDDLEstTerm();

                scope.Complete();
            }

            return(lDS);
        }
Beispiel #5
0
        /// <summary>
        /// GetSearchDetail
        ///     : 세부사항 추출쿼리 (app2000에서 사용)
        /// </summary>
        /// <param name="asAppRefID"></param>
        /// <returns></returns>
        public DataSet GetSearchDetail(string asAppRefID)
        {
            DataSet lDS = new DataSet();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                lDS = dac.GetSearchDetail(asAppRefID);

                scope.Complete();
            }

            return(lDS);
        }
Beispiel #6
0
        /// <summary>
        /// SetAppTableRep
        ///     : 상신처리를 위한 테이블 수정처리
        /// </summary>
        /// <param name="asKpiRefID"></param>
        /// <returns></returns>
        public int SetAppTableRep(
            string asAppRefID                           // 문서번호
            , string asKpiRefID                         // KPI_REF_ID
            , string asEventAddID                       // 실적처리시 월
            , string asAppCode                          // KPIINF, KPIRST
            , string asRepEmpID                         // 상신자 아이디
            , string asTermRefID                        // 평가기간
            )
        {
            int    iRet      = 0;
            string sAppRefID = "";

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                sAppRefID = asAppRefID;

                #region 결재 히스토리테이블 추가
                DataSet lDS = dac.GetApprovalLine(asAppCode, asRepEmpID);

                foreach (DataRow dr in lDS.Tables[0].Rows)
                {
                    iRet += dac.SetPrcRep(sAppRefID, dr["APP_STEP"].ToString(), dr["APP_EMP_ID"].ToString());
                }

                if (iRet <= 0 || (iRet < lDS.Tables[0].Rows.Count))
                {
                    return(0);
                }
                #endregion

                #region 결재 테이블 추가
                iRet = dac.SetInfoRep(asKpiRefID, sAppRefID, asEventAddID, asAppCode, asRepEmpID, asTermRefID);

                if (iRet <= 0)
                {
                    return(0);
                }
                #endregion


                scope.Complete();
            }

            return(iRet);
        }
Beispiel #7
0
        /// <summary>
        /// SetAppTableApproval
        ///     : 결재처리를 위한 테이블 수정처리
        /// </summary>
        /// <param name="asAppRefID"></param>
        /// <param name="asCurStep"></param>
        /// <param name="asTermRefID"></param>
        /// <returns></returns>
        public int SetAppTableApproval(string asAppRefID, string asCurStep, string asTermRefID)
        {
            int iRet = 0;
            int iTmp = 0;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                iRet = dac.SetPrcApproval(asAppRefID, asCurStep);

                if (iRet <= 0)
                {
                    return(0);
                }

                iTmp = dac.ConfirmRemainStep(asAppRefID, asTermRefID);

                if (iTmp > 0)
                {
                    // 더 처리할 결재가 있다.
                    // PRC APP_STATUS = 'E' INFO.CUR_APP_STEP += 1
                    dac.SetInfoApproval(asAppRefID, asTermRefID, iTmp);
                }
                else
                {
                    // 현재문서 처리가 결재의 마지막이다.
                    // INFO, PRC APP_STATUS = 'E', INFO.APP_COMPDATE=GETDATE()
                    iRet = dac.SetInfoApproval(asAppRefID, asTermRefID, iTmp);

                    if (iRet <= 0)
                    {
                        return(0);
                    }
                }



                scope.Complete();
            }

            return(iRet);
        }
Beispiel #8
0
        public string GetSplitCancelMailInfo(string asAppRefID, string asAppStep)
        {
            string sRet = "";

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();
                DataSet         lDS = dac.GetDSCancelMailInfo(asAppRefID, asAppStep);

                foreach (DataRow dr in lDS.Tables[0].Rows)
                {
                    sRet += dr["V_KPIINFO"].ToString() + ";"
                            + dr["V_APP_EMP_NAME"].ToString() + ";"
                            + dr["V_APP_EMP_EMAIL"].ToString() + ";"
                            + dr["V_REP_EMP_EMAIL"].ToString() + ";";
                }
            }

            return(sRet);
        }
Beispiel #9
0
        /// <summary>
        /// SetKPIConfirmStatus
        ///     : 문서타입에 관련된 KPI 테이블의 CONFIRMSTATUS를 설정한다.
        /// </summary>
        /// <param name="asAppCode"></param>
        /// <param name="asTmCode"></param>
        /// <returns></returns>
        public int SetKPIConfirmStatus(string asAppCode, string asKpiRefID, string asTmCode, int aiStatus)
        {
            int iRet = 0;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                Dac_app_app0000 dac = new Dac_app_app0000();

                if (asAppCode == "KPIINF")
                {
                    iRet = dac.SetKPIInfoApproval(asKpiRefID, aiStatus);
                }
                else if (asAppCode == "KPIRST")
                {
                    iRet = dac.SetKPIResultApproval(asKpiRefID, asTmCode, aiStatus);
                }

                scope.Complete();
            }

            return(iRet);
        }
Beispiel #10
0
        public bool IsKPIApprovalInfo(string asEmpID, string asKpiRefID, string asAppCode, string asMonth, out string sErrMsg)
        {
            bool bRet = false;

            sErrMsg = "";

            int     iCnt        = -1;
            string  sChampEmpID = "";
            string  sAppStatus  = "";
            DataSet lDS         = null;

            Dac_app_app0000 dac = new Dac_app_app0000();

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Suppress))
            {
                lDS = dac.GetKPIApprovalInfo(asKpiRefID, asAppCode, asMonth);

                iCnt        = Convert.ToInt32(lDS.Tables[0].Rows[0]["V_CNT"]);
                sChampEmpID = lDS.Tables[0].Rows[0]["V_CHAM_EMP_ID"].ToString();
                sAppStatus  = lDS.Tables[0].Rows[0]["V_APP_STATUS"].ToString();

                scope.Complete();
            }

            // iCnt가 0 이거나
            // iCnt == 1 이면서 sAppStatus == "C", "E"인 상태만 상신할 수 있다.
            // 자기 KPI만 처리 가능하다.

            if (iCnt == 0 && (asEmpID == sChampEmpID))
            {
                bRet = true;
            }
            else if (sAppStatus != "P" && (asEmpID == sChampEmpID))
            {
                bRet = true;
            }
            else
            {
                bRet = false;

                if (iCnt < 0)
                {
                    sErrMsg = "테이블 검색 오류입니다!";
                }
                else
                {
                    switch (sAppStatus)
                    {
                    case "P":
                        sErrMsg = "해당 KPI정보로 이미 상신되어 결재대기중에 있습니다!";
                        break;

                    default:
                        sErrMsg = "해당 KPI정보로 알 수 없는 타입의 결재정보가 있습니다!\\n\\n[" + asKpiRefID + "] 의 코드로 관리자에게 문의하십시요";
                        break;
                    }
                }
            }


            if (bRet)
            {
                // 실적KPI관련 상신인가?
                // 실적KPI상신이면 CHECKSTATUS = 1 && CONFIRMSTATUS = 0 인 경우만 확정가능
                if (asMonth != "")
                {
                    lDS = dac.GetKPIStatus(asKpiRefID, asMonth);

                    if (
                        Convert.ToBoolean(lDS.Tables[0].Rows[0]["CHECKSTATUS"]) == true &&
                        Convert.ToBoolean(lDS.Tables[0].Rows[0]["CONFIRMSTATUS"]) == false
                        )
                    {
                        bRet = true;
                    }
                    else
                    {
                        bRet = false;

                        sErrMsg = "실적관련 결재대상건이 아닙니다!";
                    }
                }
            }

            return(bRet);
        }