Example #1
0
    public SCT_PA getPersonnelArea()
    {
        logger.Info("Method : getPersonnelArea Start");

        try
        {
            SCT_PA result = new SCT_PA();
            SCTInterface PA_SI = new SCTInterface();
            result = PA_SI.getPersonnelArea_SI();

            logger.Info("Method : getPersonnelArea Stop");

            return result;
        }
        catch (SqlException ex)
        {
            webServiceExHandling.ExceptionLog(ex);
            //string mailBody = string.Format(SCT_Constants.mail_BodyFormat,System.DateTime.Now.ToString("F"),PReqNo,ex.TargetSite.ToString(),ex.ToString());
            //webServiceExHandling.Send_Email(SCT_Constants.Email_Dic, mailBody);

            SCT_PA Error = new SCT_PA();
            Error.SCT_header.StatusFlag = ex.Number;
            string expCode = ExpType(ex);
            Error.SCT_header.StatusMsg = SCT_Constants.cnfgErrMessages[expCode];

            logger.Debug("Return object Error : Status Flag = " + Error.SCT_header.StatusFlag.ToString());
            logger.Debug("Return object Error : Status Message = " + Error.SCT_header.StatusMsg);
            logger.Error("Method : getPersonnelArea Stop");

            return Error;
        }

        catch (Exception ex)
        {
            webServiceExHandling.ExceptionLog(ex);
            //string mailBody = string.Format(SCT_Constants.mail_BodyFormat, System.DateTime.Now.ToString("F"), PReqNo, ex.TargetSite.ToString(), ex.ToString());
            //webServiceExHandling.Send_Email(SCT_Constants.Email_Dic, mailBody);

            SCT_PA Error = new SCT_PA();
            Error.SCT_header.StatusFlag = 1;
            Error.SCT_header.StatusMsg = SCT_Constants.Error;

            logger.Debug("Return object Error : ErrorCode = " + Error.SCT_header.StatusFlag.ToString());
            logger.Debug("Return object Error : ErrorMessage = " + Error.SCT_header.StatusMsg);
            logger.Error("Method : searchEmployee Stop");

            return Error;
        }
    }