Ejemplo n.º 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 iSmartEntity getPurchaseRequestDetails_BAL(string PReqNo_BAL)
        {
            try
            {
                logger.Debug("iSmart_BAL: getPurchaseRequestDetails_BAL() called");
                logger.Debug("PReqNo value : " + PReqNo_BAL);

                if ( string.IsNullOrEmpty(PReqNo_BAL) )
                {
                    iSmartEntity is_Details = new iSmartEntity();
                    is_Details.IS_headerDetails.ErrorCode = 21;
                    is_Details.IS_headerDetails.ErrorMessage = iSmart_Constants.PReqNoNull;

                    logger.Debug("Method getiSmartDetails_BAL : ErrorCode = " + is_Details.IS_headerDetails.ErrorCode.ToString());
                    logger.Debug("Method getiSmartDetails_BAL : ErrorMessage = " + is_Details.IS_headerDetails.ErrorMessage);
                    logger.Error("Method : getiSmartDetails_BAL validation failed");

                    return is_Details;
                }

                iSmart_DAL getIS_DAL = new iSmart_DAL();
                return (getIS_DAL.getPurchaseRequestDetails_DAL(PReqNo_BAL));
            }
            catch (SqlException dbEx)
            {
                logger.Error("Exception  At BAL - getPurchaseRequestDetails_BAL  : " + dbEx.Message.ToString());
                logger.Error("timesheet_BAL: getPurchaseRequestDetails_BAL() returning error");
                throw dbEx;
            }
            catch(Exception ex)
            {
                logger.Error("Exception  At BAL - getPurchaseRequestDetails_BAL  : " + ex.Message.ToString());
                logger.Error("timesheet_BAL: getPurchaseRequestDetails_BAL() returning error");
                throw ex;
            }
        }