Beispiel #1
0
        /// <summary>
        /// Description   : To Get Company Data
        /// Created By    : Pavan
        /// Created Date  : 30 September 2014
        /// Modified By   :  
        /// Modified Date :  
        /// <returns></returns>
        /// </summary>
        public static CABBatchInfo GetCabBatchDetails(string BatchType, string OrderBy, int startPage, int resultPerPage)
        {
            var data = new CABBatchInfo();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                SqlParameter[] sqlParams = new SqlParameter[4];
                sqlParams[0] = new SqlParameter("@startPage", startPage);
                sqlParams[1] = new SqlParameter("@resultPerPage", resultPerPage);
                sqlParams[2] = new SqlParameter("@BatchType", BatchType);
                sqlParams[3] = new SqlParameter("@OrderBy", OrderBy);

                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetCabBatchDetails", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    var CABBatch = new CABBatch();
                    CABBatch.FetchBatchDetails(CABBatch, safe);
                    data.CABBatchList.Add(CABBatch);
                    data.CABBatchCount = Convert.ToInt32(reader["BatchCount"]);
                }
                return data;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return data;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Created By    : Shiva
        /// Created Date  : 19 Nov 2014
        /// Modified By   :  
        /// Modified Date :  
        /// Description   : To Get the Batch Type
        /// </summary>        
        public static CABBatchInfo GetMBatchType()
        {
            var data = new CABBatchInfo();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetMBatchType");
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    var CABBatch = new CABBatch();
                    CABBatch.FetchBATCHType(CABBatch, safe);
                    data.CABBatchList.Add(CABBatch);
                }
                return data;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return data;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Description  : Gap analysis by BatchType.
        /// Created By   : Shiva
        /// Created Date : 22 Dec 2014
        /// Modified By  :
        /// Modified Date:
        /// </summary>
        public static CABBatchInfo GetBabBatchGapByBatchType(string BatchType)
        {
            var GetGapInfo = new CABBatchInfo();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                SqlParameter[] sqlParams = new SqlParameter[1];
                sqlParams[0] = new SqlParameter("@BatchType", BatchType);
                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetCabBatchGapAnalysisByBatchType_Club", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    var GapInfo = new CABBatch();
                    GapInfo.FetchGapInfo(GapInfo, safe);
                    GetGapInfo.CABBatchList.Add(GapInfo);
                }
                return GetGapInfo;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return GetGapInfo;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }