protected static FR_L5QF_GQFS_1447 Execute(DbConnection Connection, DbTransaction Transaction, P_L5QF_GQFS_1447 Parameter, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { #region UserCode var returnValue = new FR_L5QF_GQFS_1447(); ORM_CMN_STR_Skill.Query skillQuery = new ORM_CMN_STR_Skill.Query(); skillQuery.CMN_STR_SkillID = Parameter.CMN_STR_SkillID; skillQuery.IsDeleted = false; skillQuery.Tenant_RefID = securityTicket.TenantID; List <ORM_CMN_STR_Skill> skills = ORM_CMN_STR_Skill.Query.Search(Connection, Transaction, skillQuery); if (skills != null && skills.Count != 0) { L5QF_GQFT_1443 qualification = new L5QF_GQFT_1443(); ORM_CMN_STR_Skill skill = skills[0]; qualification.CMN_STR_SkillID = skill.CMN_STR_SkillID; qualification.Skill_Name = skill.Skill_Name; qualification.Skill_Description = skill.Skill_Description; returnValue.Result = new L5QF_GQFS_1447(); returnValue.Result.Qualification = qualification; } //Put your code here return(returnValue); #endregion UserCode }
protected static FR_L5QF_GQFT_1443_Array Execute(DbConnection Connection, DbTransaction Transaction, CSV2Core.SessionSecurity.SessionSecurityTicket securityTicket = null) { var returnStatus = new FR_L5QF_GQFT_1443_Array(); DbCommand command = Connection.CreateCommand(); command.Connection = Connection; command.Transaction = Transaction; var commandLocation = "CL5_Plannico_Qualifications.Atomic.Retrieval.SQL.cls_Get_Qualifications_For_Tenant.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; List <L5QF_GQFT_1443> results = new List <L5QF_GQFT_1443>(); 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[] { "CMN_STR_SkillID", "Skill_Name_DictID", "Skill_Description_DictID" }); while (reader.Read()) { L5QF_GQFT_1443 resultItem = new L5QF_GQFT_1443(); //0:Parameter CMN_STR_SkillID of type Guid resultItem.CMN_STR_SkillID = reader.GetGuid(0); //1:Parameter Skill_Name of type Dict resultItem.Skill_Name = reader.GetDictionary(1); resultItem.Skill_Name.SourceTable = "cmn_str_skills"; loader.Append(resultItem.Skill_Name); //2:Parameter Skill_Description of type Dict resultItem.Skill_Description = reader.GetDictionary(2); resultItem.Skill_Description.SourceTable = "cmn_str_skills"; loader.Append(resultItem.Skill_Description); results.Add(resultItem); } } catch (Exception ex) { reader.Close(); throw new Exception("Exception occured durng data retrieval in method cls_Get_Qualifications_For_Tenant", ex); } reader.Close(); //Load all the dictionaries from the datatables loader.Load(); returnStatus.Result = results.ToArray(); return(returnStatus); }