Exemplo n.º 1
0
        /// <summary>
        /// Description  : Get the Group information from CSS1
        /// Created By   : Shiva
        /// Created Date : 10 July 2014
        /// Modified By  :
        /// Modified Date:
        /// </summary>
        /// <returns></returns>
        public static GroupInfo GetCSS1GroupDetails()
        {
            var data = new GroupInfo();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                var lstGroupInfo = new List<GroupInfo>();
                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetCSS1GroupDetails");
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    var getGroupInfo = new GroupInfo();
                    getGroupInfo.FetchGroupInfo(getGroupInfo, safe);
                    lstGroupInfo.Add(getGroupInfo);
                }
                data.GroupInfoList = lstGroupInfo;
                return data;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return data;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }
Exemplo n.º 2
0
 private GroupInfo FetchGroupInfo(GroupInfo getGroupInfo, SafeDataReader dr)
 {
     getGroupInfo.GroupID = dr.GetInt32("GroupID");
     getGroupInfo.GroupName = dr.GetString("GroupName");
     return getGroupInfo;
 }