示例#1
0
        //***************************************************************************************************
        public SCT_BLoc getBaseLocation_BAL()
        {
            try
            {
                logger.Info("Method : getBaseLocation_BAL Start");

                SCT_DAL get_DAL = new SCT_DAL();
                return (get_DAL.getBaseLocation_DAL());
            }
            catch (SqlException dbEx)
            {
                logger.Fatal("Exception  At BAL - getBaseLocation_BAL  : " + dbEx.Message.ToString());
                logger.Error("Method : getBaseLocation_BAL Stop");
                throw dbEx;
            }
            catch (Exception ex)
            {
                logger.Fatal("Exception  At BAL - getBaseLocation_BAL  : " + ex.Message.ToString());
                logger.Error("Method : getBaseLocation_BAL Stop");
                throw ex;
            }
        }
示例#2
0
        /// <summary>
        /// This Method validates the input parameters for the updatePurchaseRequest function
        /// </summary>
        /// <param name="entry_BAL"></param>
        /// <returns></returns>
        /// <history>
        ///     Hari haran      08/05/2012      created
        /// </history>
        public SCT_UpdateOutputEntity updateSCEmployeeDetails_BAL(SCT_UpdateInputEntity entry_BAL)
        {
            try
            {
                logger.Info("Method : updateSCEmployeeDetails_BAL Start");
                logger.Debug("Method : updateSCEmployeeDetails_BAL RequestId value : " + entry_BAL.EmpNo.ToString());

                SCT_UpdateOutputEntity errRes = new SCT_UpdateOutputEntity();
                errRes.StatusFlag = 1;
                errRes.Message = SCT_Constants.Error;
                int validate_sctParamFlag = 0;

                validate_sctParamFlag = validate_sctParam(entry_BAL);

                logger.Debug("SCT Input parameter validation flag value(success = 0/failure = 1)  : " + validate_sctParamFlag.ToString());

                if (validate_sctParamFlag == 1)
                {
                    logger.Debug("Error in input parameter values");
                    logger.Debug("ErrorCode = " + errRes.StatusFlag.ToString());
                    logger.Debug("ErrorMessage = " + errRes.Message);
                    logger.Error("Method : updateSCEmployeeDetails_BAL Stop");

                    return errRes;
                }
                else
                {
                    SCT_DAL updateSCT_DAL = new SCT_DAL();
                    return (updateSCT_DAL.updateSCEmployeeDetails_DAL(entry_BAL));
                }
            }
            catch (SqlException dbEx)
            {
                logger.Fatal("Exception  At BAL - updateSCEmployeeDetails_BAL  : " + dbEx.Message.ToString());
                logger.Error("Method : updateSCEmployeeDetails_BAL Stop");

                throw dbEx;
            }
            catch (Exception ex)
            {
                logger.Fatal("Exception  At BAL - updateSCEmployeeDetails_BAL  : " + ex.Message.ToString());
                logger.Error("Method : updateSCEmployeeDetails_BAL Stop");

                throw ex;
            }
        }
示例#3
0
        //***************************************************************************************************
        public SCT_Entity getSCEmployeeDetails_BAL(string empId_BAL, string mgrId_BAL)
        {
            try
            {
                logger.Info("Method : getSCEmployeeDetails_BAL Start");

                if (string.IsNullOrEmpty(empId_BAL) || string.IsNullOrEmpty(mgrId_BAL))
                {
                    SCT_Entity sct_Error = new SCT_Entity();
                    sct_Error.StatusFlag = 21;
                    sct_Error.StatusMsg = SCT_Constants.IdNull;

                    logger.Debug("Method getSCEmployeeDetails_BAL : ErrorCode = " + sct_Error.StatusFlag.ToString());
                    logger.Debug("Method getSCEmployeeDetails_BAL : ErrorMessage = " + sct_Error.StatusMsg);
                    logger.Error("Method : getSCEmployeeDetails_BAL Stop");

                    return sct_Error;
                }
                SCT_DAL get_DAL = new SCT_DAL();
                return (get_DAL.getSCEmployeeDetails_DAL(empId_BAL,mgrId_BAL));
            }
            catch (SqlException dbEx)
            {
                logger.Fatal("Exception  At BAL - getSCEmployeeDetails_BAL  : " + dbEx.Message.ToString());
                logger.Error("Method : getSCEmployeeDetails_BAL Stop");
                throw dbEx;
            }
            catch (Exception ex)
            {
                logger.Fatal("Exception  At BAL - getSCEmployeeDetails_BAL  : " + ex.Message.ToString());
                logger.Error("Method : getSCEmployeeDetails_BAL Stop");
                throw ex;
            }
        }
示例#4
0
        // <summary>
        /// This Method validates the input parameter for the getPurchaseRequestDetails function
        /// </summary>
        /// <param name="PReqNo_BAL"></param>
        /// <returns></returns>
        /// <history>
        ///     Hari haran      07/05/2012      created
        /// </history>
        public SCT_Emp searchEmployee_BAL(string Name_BAL, string MgrId_BAL, string Flag)
        {
            try
            {
                logger.Info("Method : searchEmployee_BAL Start");

                int validateParam = searchParam(Name_BAL, MgrId_BAL, Flag);

                if ( validateParam == 1 )
                {
                    SCT_Emp sct_Details = new SCT_Emp();
                    sct_Details.SCT_headerDetails.StatusFlag = 21;
                    sct_Details.SCT_headerDetails.StatusMsg = SCT_Constants.ParamNull;

                    logger.Debug("Method searchEmployee_BAL : ErrorCode = " + sct_Details.SCT_headerDetails.StatusFlag.ToString());
                    logger.Debug("Method searchEmployee_BAL : ErrorMessage = " + sct_Details.SCT_headerDetails.StatusMsg);
                    logger.Error("Method : searchEmployee_BAL Stop");

                    return sct_Details;
                }

                SCT_DAL search_DAL = new SCT_DAL();
                return (search_DAL.searchEmployee_DAL(Name_BAL, MgrId_BAL, Flag));
            }
            catch (SqlException dbEx)
            {
                logger.Fatal("Exception  At BAL - searchEmployee_BAL  : " + dbEx.Message.ToString());
                logger.Error("Method : searchEmployee_BAL Stop");
                throw dbEx;
            }
            catch (Exception ex)
            {
                logger.Fatal("Exception  At BAL - searchEmployee_BAL  : " + ex.Message.ToString());
                logger.Error("Method : searchEmployee_BAL Stop");
                throw ex;
            }
        }
示例#5
0
        //***************************************************************************************************
        public SCT_RChange getReasonForChange_BAL()
        {
            try
            {
                logger.Info("Method : getReasonForChange_BAL Start");

                SCT_DAL search_DAL = new SCT_DAL();
                return (search_DAL.getReasonForChange_DAL());
            }
            catch (SqlException dbEx)
            {
                logger.Fatal("Exception  At BAL - getReasonForChange_BAL  : " + dbEx.Message.ToString());
                logger.Error("Method : getReasonForChange_BAL Stop");
                throw dbEx;
            }
            catch (Exception ex)
            {
                logger.Fatal("Exception  At BAL - getReasonForChange_BAL  : " + ex.Message.ToString());
                logger.Error("Method : getReasonForChange_BAL Stop");
                throw ex;
            }
        }