Example #1
0
    public SCT_AuthUser authenticateUser(string UserId, string UserPwd)
    {
        logger.Info("Method : authenticateUser Start");
        logger.DebugFormat("Input parameter Id : {0} ", UserId);
        logger.DebugFormat("Input parameter Password : {0} ", UserPwd);

        try
        {
            SCT_AuthUser result = new SCT_AuthUser();
            SCTInterface authUsr_SI = new SCTInterface();
            result = authUsr_SI.authenticateUser_SI(UserId, UserPwd);

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

            return result;
        }
        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_AuthUser Error = new SCT_AuthUser();
            Error.StatusFlag = 1;
            Error.Message = SCT_Constants.Error;

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

            return Error;
        }
    }
Example #2
0
    public SCT_BLoc getBaseLocation()
    {
        logger.Info("Method : getBaseLocation Start");

        try
        {
            SCT_BLoc result = new SCT_BLoc();
            SCTInterface BLoc_SI = new SCTInterface();
            result = BLoc_SI.getBaseLocation_SI();

            logger.Info("Method : getBaseLocation 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_BLoc Error = new SCT_BLoc();
            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 : getBaseLocation 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_BLoc Error = new SCT_BLoc();
            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 : getBaseLocation Stop");

            return Error;
        }
    }
Example #3
0
    public SCT_UpdateOutputEntity updateSCEmployeeDetails([XmlElement("SCT_Input")] SCT_UpdateInputEntity SCT_Entry)
    {
        logger.Info("Method : updateSCEmployeeDetails Start");
        logger.Debug("EmployeeID value : " + SCT_Entry.EmpNo.ToString());

        SCT_UpdateOutputEntity result = new SCT_UpdateOutputEntity();
        try
        {
            SCTInterface updateSCT_IS = new SCTInterface();
            result = updateSCT_IS.updateSCEmployeeDetails_SI(SCT_Entry);

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

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

            result.StatusFlag = 1;
            string expCode = ExpType(ex);
            result.Message = SCT_Constants.cnfgErrMessages[expCode];

            logger.Debug("Return object Error : ErrorCode = " + result.StatusFlag.ToString());
            logger.Debug("Return object Error : ErrorMessage = " + result.Message);
            logger.Error("Method : updateSCEmployeeDetails Stop");

            return result;

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

            result.StatusFlag = 1;
            result.Message = SCT_Constants.Error;

            logger.Debug("Return object Error : ErrorCode = " + result.StatusFlag.ToString());
            logger.Debug("Return object Error : ErrorMessage = " + result.Message);
            logger.Error("Method : updateSCEmployeeDetails Stop");

            return result;
        }
    }
Example #4
0
    public SCT_Emp searchEmployee(string Name, string MgrId, string Flag)
    {
        logger.Info("Method : searchEmployee Start");
        logger.DebugFormat("Input parameter Name : {0} ", Name);
        logger.DebugFormat("Input parameter ManagerId : {0} ", MgrId);

        try
        {
            SCT_Emp result = new SCT_Emp();
            SCTInterface search_SI = new SCTInterface();
            result = search_SI.searchEmployee_SI(Name, MgrId, Flag);

            logger.Info("Method : searchEmployee 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_Emp Error = new SCT_Emp();
            Error.SCT_headerDetails.StatusFlag = ex.Number;
            string expCode = ExpType(ex);
            Error.SCT_headerDetails.StatusMsg = SCT_Constants.cnfgErrMessages[expCode];

            logger.Debug("Return object Error : Status Flag = " + Error.SCT_headerDetails.StatusFlag.ToString());
            logger.Debug("Return object Error : Status Message = " + Error.SCT_headerDetails.StatusMsg);
            logger.Error("Method : searchEmployee 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_Emp Error = new SCT_Emp();
            Error.SCT_headerDetails.StatusFlag = 1;
            Error.SCT_headerDetails.StatusMsg = SCT_Constants.Error;

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

            return Error;
        }
    }