Ejemplo n.º 1
0
 private ModeOfAppointment FetchModeOfAppointment(ModeOfAppointment ModeOfAppointment, SafeDataReader dr)
 {
     ModeOfAppointment.ID = dr.GetInt32("ID");
     ModeOfAppointment.Name = dr.GetString("Name");
     return ModeOfAppointment;
 }
Ejemplo n.º 2
0
            /// <summary>
            /// Description  : Get ModeOfAppointment Details from database.
            /// Created By   : Pavan
            /// Created Date : 23 August 2014
            /// Modified By  :
            /// Modified Date:
            /// </summary>
            /// <returns></returns>
            public static List<ModeOfAppointment> GetModeOfAppointmentDetails()
            {
                var data = new List<ModeOfAppointment>();

                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, "[SpGetMModeOfAppointment]");
                    var safe = new SafeDataReader(reader);
                    while (reader.Read())
                    {
                        var ModeOfAppointment = new ModeOfAppointment();
                        ModeOfAppointment.FetchModeOfAppointment(ModeOfAppointment, safe);
                        data.Add(ModeOfAppointment);
                    }
                    return data;
                }
                catch (Exception ex)
                {
                    log.Error("Error: " + ex);
                    return data;
                }
                finally
                {
                    log.Debug("End: " + methodBase.Name);
                }
            }