Beispiel #1
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;
            }
        }