///<summary> /// Method Invocation of wrapper classes ///<summary> protected static FR_L3MD_GDBIwPfID_1208 Invoke(DbConnection Connection, DbTransaction Transaction, string ConnectionString, P_L3MD_GDBIwPfID_1208 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { bool cleanupConnection = Connection == null; bool cleanupTransaction = Transaction == null; FR_L3MD_GDBIwPfID_1208 functionReturn = new FR_L3MD_GDBIwPfID_1208(); try { if (cleanupConnection == true) { Connection = CSV2Core_MySQL.Support.DBSQLSupport.CreateConnection(ConnectionString); Connection.Open(); } if (cleanupTransaction == true) { Transaction = Connection.BeginTransaction(); } functionReturn = Execute(Connection, Transaction, Parameter, securityTicket); #region Cleanup Connection/Transaction //Commit the transaction if (cleanupTransaction == true) { Transaction.Commit(); } //Close the connection if (cleanupConnection == true) { Connection.Close(); } #endregion } catch (Exception ex) { try { if (cleanupTransaction == true && Transaction != null) { Transaction.Rollback(); } } catch { } try { if (cleanupConnection == true && Connection != null) { Connection.Close(); } } catch { } throw new Exception("Exception occured in method cls_Get_Doctor_BaseInfo_withPractice_byID", ex); } return(functionReturn); }
protected static FR_L3MD_GDBIwPfID_1208 Execute(DbConnection Connection, DbTransaction Transaction, P_L3MD_GDBIwPfID_1208 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { var returnStatus = new FR_L3MD_GDBIwPfID_1208(); DbCommand command = Connection.CreateCommand(); command.Connection = Connection; command.Transaction = Transaction; var commandLocation = "CL3_Doctors.Atomic.Retrieval.SQL.cls_Get_Doctor_BaseInfo_withPractice_byID.sql"; command.CommandText = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(commandLocation)).ReadToEnd(); CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "ticket", securityTicket); command.CommandTimeout = QueryTimeout; CSV2Core_MySQL.Support.DBSQLSupport.SetParameter(command, "DoctorID", Parameter.DoctorID); List <L3MD_GDBIwPfID_1208_raw> results = new List <L3MD_GDBIwPfID_1208_raw>(); var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(Connection, Transaction); var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader()); try { reader.SetOrdinals(new string[] { "Doctor_CMN_BPT_BusinessParticipantID", "HEC_DoctorID", "LANR", "FirstName", "LastName", "Title", "LoginEmail", "Account_RefID", "Salutation_General", "Salutation_Letter", "AccountHolder", "AccountNumber", "BankName", "BICCode", "IBAN", "BLZ", "PracticeName", "PracticeID", "CMN_BPT_BusinessParticipantID", "AssociatedParticipant_FunctionName", "Creation_Timestamp", "Content", "Contact_Type" }); while (reader.Read()) { L3MD_GDBIwPfID_1208_raw resultItem = new L3MD_GDBIwPfID_1208_raw(); //0:Parameter Doctor_CMN_BPT_BusinessParticipantID of type Guid resultItem.Doctor_CMN_BPT_BusinessParticipantID = reader.GetGuid(0); //1:Parameter HEC_DoctorID of type Guid resultItem.HEC_DoctorID = reader.GetGuid(1); //2:Parameter LANR of type String resultItem.LANR = reader.GetString(2); //3:Parameter FirstName of type String resultItem.FirstName = reader.GetString(3); //4:Parameter LastName of type String resultItem.LastName = reader.GetString(4); //5:Parameter Title of type String resultItem.Title = reader.GetString(5); //6:Parameter LoginEmail of type String resultItem.LoginEmail = reader.GetString(6); //7:Parameter Account_RefID of type Guid resultItem.Account_RefID = reader.GetGuid(7); //8:Parameter Salutation_General of type String resultItem.Salutation_General = reader.GetString(8); //9:Parameter Salutation_Letter of type String resultItem.Salutation_Letter = reader.GetString(9); //10:Parameter AccountHolder of type String resultItem.AccountHolder = reader.GetString(10); //11:Parameter AccountNumber of type String resultItem.AccountNumber = reader.GetString(11); //12:Parameter BankName of type String resultItem.BankName = reader.GetString(12); //13:Parameter BICCode of type String resultItem.BICCode = reader.GetString(13); //14:Parameter IBAN of type String resultItem.IBAN = reader.GetString(14); //15:Parameter BLZ of type String resultItem.BLZ = reader.GetString(15); //16:Parameter PracticeName of type String resultItem.PracticeName = reader.GetString(16); //17:Parameter PracticeID of type Guid resultItem.PracticeID = reader.GetGuid(17); //18:Parameter CMN_BPT_BusinessParticipantID of type Guid resultItem.CMN_BPT_BusinessParticipantID = reader.GetGuid(18); //19:Parameter AssociatedParticipant_FunctionName of type String resultItem.AssociatedParticipant_FunctionName = reader.GetString(19); //20:Parameter Creation_Timestamp of type DateTime resultItem.Creation_Timestamp = reader.GetDate(20); //21:Parameter Content of type String resultItem.Content = reader.GetString(21); //22:Parameter Contact_Type of type Guid resultItem.Contact_Type = reader.GetGuid(22); results.Add(resultItem); } } catch (Exception ex) { reader.Close(); throw new Exception("Exception occured durng data retrieval in method cls_Get_Doctor_BaseInfo_withPractice_byID", ex); } reader.Close(); //Load all the dictionaries from the datatables loader.Load(); returnStatus.Result = L3MD_GDBIwPfID_1208_raw.Convert(results).FirstOrDefault(); return(returnStatus); }