/// <summary> /// Description : Get Directors Details from database. /// Created By : Pavan /// Created Date : 31 July 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns></returns> public static DirectorsInfo GetDirectorsDetails(string SearchType, string SearchKeyWord, string SearchRole, int WOID, string NatureAppoint, int ClassOfShare) { var data = new DirectorsInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[6]; sqlParams[0] = new SqlParameter("@SearchType", SearchType); sqlParams[1] = new SqlParameter("@WOID", WOID); sqlParams[2] = new SqlParameter("@SearchRole", SearchRole); sqlParams[3] = new SqlParameter("@SearchKeyWord", SearchKeyWord); sqlParams[4] = new SqlParameter("@NatureAppoint", NatureAppoint); sqlParams[5] = new SqlParameter("@ClassOfShare", ClassOfShare); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetAllDirectorDetails]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var directors = new Directors(); directors.FetchDirectorsDetails(directors, safe); data.DirectorsList.Add(directors); } return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }