private static string RecipientsNotFoundMessage(ITATSystem system, List<string> roles, List<int> facilityIDs)
		{
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.Append("<p /><p />");
			sb.Append("<p><b>The system was unable to determine the recipient for this message.  ");

            if (roles != null && roles.Count > 0)
            {
                sb.AppendFormat("The following role(s) were defined: {0}.  ", string.Join(",", roles.ToArray()).TrimEnd(','));
            }
            else
            {
                sb.Append("No roles were defined for this message.  ");
            }

            if (facilityIDs != null && facilityIDs.Count > 0)
            {
                System.Text.StringBuilder sbFacilityList = new System.Text.StringBuilder();
                sbFacilityList.Append("");
                foreach (int facilityID in facilityIDs)
                    sbFacilityList.AppendFormat("{0},", facilityID.ToString());
                sb.AppendFormat("The following facilities were defined:  {0}.    ", sbFacilityList.ToString().TrimEnd(','));
            }
            else
            {
                sb.Append("No facilities were defined for this message.    ");
            }
            sb.Append("This e-mail has been sent to you because you have designated as an owner of the ");
			sb.Append(system.Name);
			sb.Append(" system.</b></p>");
			sb.Append("<p /><p />");
			return sb.ToString();
		}
		public static int SendEmail(string from, string subject, string body, Kindred.Common.Security.NameEmailPair[] recipients, ITATSystem system, List<string> roles, List<int> facilityIDs)
		{
			Kindred.Common.Email.Email email = new Kindred.Common.Email.Email();
			string emailBody = System.Web.HttpUtility.HtmlDecode(body);

			string[] overrideRecipients = system.OverrideEmail.Split(new char[] { ',', '|' }, StringSplitOptions.RemoveEmptyEntries);
			string[] ownerRecipients = system.OwnerEmail.Split(new char[] { ',', '|' }, StringSplitOptions.RemoveEmptyEntries);

			//Determine actual recipients and whether to add a "debug" or "recipients not found" message to the email body
			if (recipients.Length > 0)
			{
				if (overrideRecipients.Length > 0)
				{
					emailBody = DebugMessage(recipients) + emailBody;
					AddRecipients(email, overrideRecipients);
				}
				else
				{
					AddRecipients(email, recipients);  
				}
			}
			else
			{
				if (overrideRecipients.Length > 0)
				{
                    emailBody = DebugMessage(recipients) + emailBody + RecipientsNotFoundMessage(system, roles, facilityIDs);
					AddRecipients(email, overrideRecipients);
				}
				else
				{
                    emailBody = emailBody + RecipientsNotFoundMessage(system, roles, facilityIDs);
					AddRecipients(email, ownerRecipients);
				}
			}

			if (string.IsNullOrEmpty(email.To))
			{
                emailBody = emailBody + RecipientsNotFoundMessage(system, roles, facilityIDs);
				AddRecipients(email, ownerRecipients);
				if (string.IsNullOrEmpty(email.To))
				{
					throw new Exception("No e-mail recipients were found.   This should not happen, because the OwnerEmail attribute in the System Def XML should contain at least one e-mail address.  Report this issue to Support.");
				}
			}

			email.Subject = subject;
			email.From = from;
			email.Format = Kindred.Common.Email.EmailFormat.Html;
			email.Body = emailBody;
            email.ApplicationName = EmailName(system.Name);
			return email.Send();
		}
        public SearchControl(ITATSystem itatSystem, bool showTerm1, bool showTerm2, bool showTerm3, bool showTerm4, bool showTerm5, bool showTerm6, bool showTerm7, SearchCriteria searchCriteria)
        {
            this._itatSystem = itatSystem;
            this._displayTerm1 = showTerm1;
            this._displayTerm2 = showTerm2;
            this._displayTerm3 = showTerm3;
            this._displayTerm4 = showTerm4;
            this._displayTerm5 = showTerm5;
            this._displayTerm6 = showTerm6;
            this._displayTerm7 = showTerm7;

            this._searchCriteria=searchCriteria;
        }
        public SearchControl()
        {
            string qsValue = ((Page)HttpContext.Current.Handler).Request.QueryString[Common.Names._QS_ITAT_SYSTEM_ID];
            //ASSUMPTION: 
            //   If qsValue is of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx or {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, 
            //           then it is a systemID.
            //   Otherwise, it is the system name.
            if (Utility.TextHelper.IsGuid(qsValue))
                _itatSystem = Business.ITATSystem.Get(new Guid(qsValue));
            else
                _itatSystem = Business.ITATSystem.Get(qsValue);


            _displayTerm1 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm1;
            _displayTerm2 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm2;
            _displayTerm3 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm3;
            _displayTerm4 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm4;
            _displayTerm5 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm5;
            _displayTerm6 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm6;
            _displayTerm7 = ((ITAT.Web.Admin.DataStoreDefPage)((Page)HttpContext.Current.Handler)).DisplayTerm7;
        }
示例#5
0
		public static Report Create(string xml, ITATSystem system)
		{
			if (xml == null)
				return null;
			XmlDocument xmlTemplateDoc = new XmlDocument();
			xmlTemplateDoc.PreserveWhitespace = false;
			xmlTemplateDoc.LoadXml(xml);

			XmlNode nodeReport = xmlTemplateDoc.SelectSingleNode(Utility.XMLHelper.GetXPath(true, XMLNames._E_Report));
			if (nodeReport == null)
				return null;

            Report report = new Report();
			report._name = Utility.XMLHelper.GetAttributeString(nodeReport, XMLNames._A_Name);
			report._reportId = new Guid(Utility.XMLHelper.GetAttributeString(nodeReport, XMLNames._A_ReportID));
			report._itatSystemId = new Guid(Utility.XMLHelper.GetAttributeString(nodeReport, XMLNames._A_ITATSystemID));

			XmlNode descriptionNode = nodeReport.SelectSingleNode(XMLNames._E_Description);
			report._description = Utility.XMLHelper.GetText(descriptionNode);

            report._searchCriteria = new SearchCriteria(nodeReport);

			XmlNodeList listTerms = nodeReport.SelectNodes(Utility.XMLHelper.GetXPath(false, XMLNames._E_Terms, XMLNames._E_Term));
			if (listTerms != null)
			{
				if (listTerms.Count > 0)
				{
					report._reportTerms = new List<ReportTerm>(listTerms.Count);
					foreach (XmlNode nodeTerm in listTerms)
					{

						ReportTerm reportTerm = new ReportTerm(nodeTerm);
						report._reportTerms.Add(reportTerm);
					}
				}
			}

			return report;
		}
 public DataStoreConfig(ITATSystem system)
 {
     _system = system;
 }
示例#7
0
		public bool UpdateDocumentType(ITATSystem itatSystem, string documentType)
		{
			_documentType.Name = documentType;
            return Data.Document.UpdateDocumentType(_documentID, documentType);
		}
        public override bool RequiresSystemSync(ITATSystem system)
        {
            if (system != null && system.ExternalInterfaces != null && system.ExternalInterfaces.Count == 1)
            {
                Business.ExternalInterfaceConfig eic = system.ExternalInterfaces[0];

                if (TransformTermType.HasValue != eic.TransformTermType.HasValue)
                    return true;

                if (eic.TransformTermType.HasValue)
                {
                    if (TermTransforms == null)
                        return true;

                    if (eic.TermTransforms != null)
                    {
                        if (eic.TermTransforms.Count != TermTransforms.Count)
                            return true;

                        for (int index = 0; index < eic.TermTransforms.Count; index++)
                            if (!Term.TermTransformMatch(eic.TermTransforms[index], TermTransforms[index]))
                                return true;
                    }
                }
            }
            return false;
        }
 public DataStoreDefinition(Guid dataStoreDefinitionID, ITATSystem system)
 {
     _dataStoreDefinitionID = dataStoreDefinitionID;
     _system = system;
 }
示例#10
0
		public static void LoadRoles(System.Web.UI.WebControls.ListControl listControl, ITATSystem system,  RoleType roleTypes, List<Role> selectedRoles)
		{
			LoadRoles(listControl, system, roleTypes);
			if (selectedRoles != null)
			{
				List<string> roleNames = selectedRoles.ConvertAll<string>(Role.StringConverter);
				foreach (ListItem item in listControl.Items)
					item.Selected = roleNames.Contains(item.Value);
			}
		}
示例#11
0
		//TODO:  Allow for non-numeric hard-coded value (including empty string)
		private static string GetFirstPart(ITATSystem system, ManagedItem managedItem)
		{
			//If ManagedItemNumberSystemType is an empty string, then return an empty string
			if (string.IsNullOrEmpty(system.ManagedItemNumberSystemType))
				return string.Empty;

			//If ManagedItemNumberSystemType is a special value meaning SAP Alias, return the Owning Facility's SAP Alias
			if (system.ManagedItemNumberSystemType == XMLNames._SYSTEM_MINST_Fac_SAP4)
			{
				if (managedItem.PrimaryFacility.OwningFacilityIDs == null)
					throw new Exception(string.Format("Tried to create a sequence number for a ManagedItem which does not have any OwningFacilites defined, ManagedItem {0}", managedItem._managedItemID.ToString()));
				if (managedItem.PrimaryFacility.OwningFacilityIDs.Count == 0)
					throw new Exception(string.Format("Tried to create a sequence number for a ManagedItem which does not have any OwningFacilites defined, ManagedItem {0}", managedItem._managedItemID.ToString()));

				string sSAPID = "";
				using (DataSet ds = Data.ManagedItem.GetFacilityInfo(FacilityTerm.GetXml(managedItem.PrimaryFacility.OwningFacilityIDs)))
				{
					if (ds.Tables.Count > 0)
						if (ds.Tables[0].Rows.Count > 0)
							//This approach assumes that we are only interested in the first facilityID
							sSAPID = ds.Tables[0].Rows[0][Data.DataNames._SP_FacilitySAPID].ToString();
					if (string.IsNullOrEmpty(sSAPID))
						throw new Exception(string.Format("SAPID not found for managedItem {0}", managedItem._managedItemID.ToString()));
				}
				return sSAPID.Substring(0, 4);
			}

			//Otherwise, return the hard-coded ManagedItemNumberSystemType 
			return system.ManagedItemNumberSystemType;
		}
示例#12
0
		private static ITATSystem LoadFromDatabase(Guid systemID, List<string> validation)
		{
			ITATSystem itatSystem;
			//Try to create ITATSystem instance from the database.  If so, add it to the Cache and return it.
			//try
			//{
				DataSet ds = Data.ITATSystem.GetSystem(systemID);
				if (ds.Tables[0].Rows.Count == 0)
					return null;

				itatSystem = new ITATSystem();
				itatSystem._id = systemID;
				itatSystem._name = (string)ds.Tables[0].Rows[0][Data.DataNames._C_ITATSystemName];

				XmlDocument xmlDoc = new XmlDocument();
				xmlDoc.PreserveWhitespace = false;
				string s = (string)ds.Tables[0].Rows[0][Data.DataNames._C_ITATSystemDef];
				xmlDoc.LoadXml((string)ds.Tables[0].Rows[0][Data.DataNames._C_ITATSystemDef]);
				itatSystem.ParseSystemDef(xmlDoc, validation);

				return itatSystem;
			//}
			//catch (Exception ex)
			//{
			//    throw new XmlException(String.Format("Error retrieving ITATSystem instance from the database for system={0},   Error: {1}", systemID.ToString("D"), ex.Message));
			//}
		}
示例#13
0
        public static Guid CopyTemplate(ITATSystem itatSystem, Guid copyFrom, string newName, string newDescription)
        {
            string contentType;
            //new templates default to Status = Inactive
            Guid newTemplateId = Data.Template.CopyTemplate(copyFrom, newName, newDescription, (short)TemplateStatusType.Inactive);
            Template newTemplate = new Template(newTemplateId, DefType.Draft);

            //get XML for new Template
            XmlDocument xmlTemplateDoc = new XmlDocument();
            xmlTemplateDoc.PreserveWhitespace = false;
            xmlTemplateDoc.LoadXml(newTemplate.TemplateDef);

            //Set the retro option to 'Off' initially...
            string rootNodeXPath = string.Format("/{0}", XMLNames._E_TemplateDef);
            XmlNode nodeParent = xmlTemplateDoc.SelectSingleNode(rootNodeXPath);
            ((XmlElement)nodeParent).SetAttribute(XMLNames._A_RetroModel, Retro.RetroModel.Off.ToString());

            //give each event an new ID (to avoid cross-referencing the original template's events)
            string eventNodeXPath = string.Format("/{0}/{1}/{2}", XMLNames._E_TemplateDef, XMLNames._E_Events, XMLNames._E_Event);
            XmlNodeList eventNodes = xmlTemplateDoc.SelectNodes(eventNodeXPath);
            foreach (XmlElement eventNode in eventNodes)
                eventNode.SetAttribute(XMLNames._A_ID, Guid.NewGuid().ToString());

            //give each extension an new ObjectID (to avoid cross-referencing the original template's extensions)
            string extensionNodeXPath = string.Format("/{0}/{1}/{2}", XMLNames._E_TemplateDef, XMLNames._E_Extensions, XMLNames._E_Extension);
            XmlNodeList extensionNodes = xmlTemplateDoc.SelectNodes(extensionNodeXPath);
            foreach (XmlElement extensionNode in extensionNodes)
            {
                //get document from DocumentStore
                string documentId = extensionNode.GetAttribute(XMLNames._A_ObjectID);
                string filename = extensionNode.GetAttribute(XMLNames._A_FileName);
                Utility.DocumentStorage documentStorageObject = Utility.DocumentStorage.GetDocumentStorageObject(itatSystem.DocumentStorageType);
                documentStorageObject.RootPath = itatSystem.DocumentStorageRootPath;
                byte[] document = documentStorageObject.GetDocument(itatSystem.ID, documentId, out contentType);
                //re-save the document to the DocumentStore and get a new DocumentId.   Note that extensions MUST be PDF documents
                extensionNode.SetAttribute(XMLNames._A_ObjectID, documentStorageObject.SaveDocument(filename, "pdf", document));
            }

            //re-save the XML back to the database with the updated values
            Template.UpdateTemplateDef(newTemplate, xmlTemplateDoc.OuterXml);
            return newTemplateId;
        }
示例#14
0
		public static ITATSystem CreateNew(Guid systemID, string systemName, System.IO.Stream inputStream)
		{
			ITATSystem rtn = new ITATSystem();
			rtn._id = systemID;
			rtn._name = systemName;
			rtn.UpdateSystemDef(inputStream);
			return rtn;
		}
示例#15
0
		public static ITATSystem CreateNew(Guid systemID, string systemName, string systemDef)
		{
			ITATSystem rtn = new ITATSystem();
			rtn._id = systemID;
			rtn._name = systemName;
			rtn.UpdateSystemDef(systemDef);
			return rtn;
		}
示例#16
0
		public static void LoadRoles(System.Web.UI.WebControls.ListControl listControl, ITATSystem system, RoleType roleTypes, List<string> selectedRoles)
		{
			LoadRoles(listControl, system, roleTypes);
			if (selectedRoles != null)
			{
				foreach (ListItem item in listControl.Items)
					item.Selected = selectedRoles.Contains(item.Value);
			}
		}
示例#17
0
		public static Report Create(Guid reportID, ITATSystem system)
		{
            return Create(GetReportXml(reportID), system);
		}
示例#18
0
 public static void SendNotificationToRoles(ITATSystem system, string subject, string message, List<string> roles)
 {
     if (roles != null && roles.Count > 0)
     {
         Kindred.Common.Email.Email email = new Kindred.Common.Email.Email();
         Kindred.Common.Security.NameEmailPair[] recipients = SecurityHelper.GetEmailRecipients(system, roles);
         SendEmail(XMLNames._M_EmailFrom, subject, message, recipients, system, roles, null);
     }
 }
示例#19
0
		public string Send(ManagedItem managedItem, ITATSystem system, string sEnvironment, List<int> owningFacilityIDs)
		{
			//If the subject or body or recipients are empty, then do not send anything
			if ((string.IsNullOrEmpty(Subject)) || (string.IsNullOrEmpty(this.Text)) || (this.Recipients == null) || (this.Recipients.Count == 0))
				return string.Empty;

			string sError = string.Empty;

			string from = null;
			string subject = null;
			string text = null;
			Kindred.Common.Security.NameEmailPair[] emailRecipients = null;

			try
			{
				Kindred.Common.Email.Email email = new Kindred.Common.Email.Email();
				from = XMLNames._M_EmailFrom;
				subject = string.IsNullOrEmpty(Subject) ? "Subject Missing" : Subject;
				text = string.IsNullOrEmpty(Text) ? "Text Missing" : Text;

				Term.SubstituteBasicTerms(managedItem, ref text);
				Term.SubstituteSpecialTerms(ref text, managedItem);

				//Now complete the 'ManagedItemReference' email links - fill in the dynamically supplied info
				if (!string.IsNullOrEmpty(system.Name))
					text = text.Replace(XMLNames._M_SystemNameHolder, system.Name);
				if (!string.IsNullOrEmpty(sEnvironment))
					text = text.Replace(XMLNames._M_EnvironmentHolder, sEnvironment);
				text = text.Replace(XMLNames._M_ManagedItemIdHolder, managedItem.ManagedItemID.ToString());

				List<int> facilityIDs = null;
				if (owningFacilityIDs != null)
					facilityIDs = new List<int>(owningFacilityIDs);
				else
					facilityIDs = new List<int>();
				bool overrideFacilities = false;
				//Note - HasOwningFacility trumps use of filterFacilityTerm
				if (!(system.HasOwningFacility ?? false))
				{
					if (FilterFacilityTermID.HasValue)
					{
						Term filterFacilityTerm = managedItem.FindTerm(FilterFacilityTermID.Value);
						if (filterFacilityTerm != null)
						{
							FacilityTerm facilityTerm = null;
							if (filterFacilityTerm.TermType == TermType.Facility)
								facilityTerm = filterFacilityTerm as FacilityTerm;
							else
								facilityTerm = new FacilityTerm(false, managedItem, filterFacilityTerm);
							if (facilityTerm != null)
							{
								facilityIDs = facilityTerm.SelectedFacilityIDs;
								overrideFacilities = true;
							}
						}
					}
				}

				List<int> allRecipientFacilityIDs = new List<int>();
				
				if ((system.HasOwningFacility ?? false) || overrideFacilities)
				{
					foreach (string recipient in Recipients)
					{
						List<int> absoluteLevels = null;
						List<int> relativeLevels = null;
						system.GetFacilityLevels(recipient, ref absoluteLevels, ref relativeLevels);
						List<int> recipientFacilityIDs = FacilityCollection.FacilityAncestry(facilityIDs, absoluteLevels, relativeLevels);
						foreach (int facilityID in recipientFacilityIDs)
							if (!allRecipientFacilityIDs.Contains(facilityID))
								allRecipientFacilityIDs.Add(facilityID);
					}
					emailRecipients = SecurityHelper.GetEmailRecipients(system, Recipients, allRecipientFacilityIDs);
				}
				else
				{
					emailRecipients = SecurityHelper.GetEmailRecipients(system, Recipients);
				}

				EmailHelper.SendEmail(from, subject, text, emailRecipients, system, Recipients, allRecipientFacilityIDs);
			}
			catch (Exception e)
			{
				sError = string.Format("Email={0} Exception={1}", EmailInfo(from, emailRecipients, subject, text), e.ToString());
			}
			return sError;
		}
示例#20
0
 //Note - this approach assumes that the system only has one ExternalTerm
 public override void SyncWithSystem(ITATSystem system)
 {
     if (system.ExternalInterfaces != null && system.ExternalInterfaces.Count == 1)
     {
         Business.ExternalInterfaceConfig eic = system.ExternalInterfaces[0];
         TransformTermType = eic.TransformTermType;
         TermTransforms = eic.TermTransforms;
     }
 }
示例#21
0
 public static void SendNotificationToOwner(ITATSystem system, ManagedItem managedItem, string message, string errorMessage)
 {
     string[] ownerRecipients = system.OwnerEmail.Split(new char[] { ',', '|' }, StringSplitOptions.RemoveEmptyEntries);
     if (ownerRecipients.Length > 0)
     {
         Kindred.Common.Email.Email email = new Kindred.Common.Email.Email();
         foreach (string recipient in ownerRecipients)
             email.AddRecipient(Kindred.Common.Email.EmailRecipientType.To, recipient);
         email.Subject = string.Format("ITAT-{0} -- Unable to send notification for {1} {2}", system.Name, system.ManagedItemName, managedItem.ItemNumber);
         email.From = XMLNames._M_EmailFrom;
         email.Format = Kindred.Common.Email.EmailFormat.Html;
         email.Body = string.Format("<b>ITAT-{0} was unable to send a notification for {1} {2}.<br /><br />{3}</b><br /><br /><br />{4}", system.Name, system.ManagedItemName, managedItem.ItemNumber, errorMessage, message);
         email.ApplicationName = EmailName(system.Name);
         email.Send();
     }
 }
示例#22
0
		//NOTE: Since the RoleType enum has the Flags attribute set, "roleTypes" can denote multiple RoleType's
		//For a given role, if ANY of the roles RoleType values match  ANY of the RoleType values specified in "roleTypes", then that role is included in the ListControl.
		private static void LoadRoles(System.Web.UI.WebControls.ListControl listControl, ITATSystem system, RoleType roleTypes)
		{
			List<Role> roles = new List<Role>();
			foreach (Role role in system.Roles)
				if ((role.RoleType & roleTypes) != RoleType.None)
					roles.Add(role);
			listControl.DataSource = roles;
			listControl.DataTextField = "Name";
			listControl.DataValueField = "Name";
			listControl.DataBind();
		}
		public SecurityHelper(ITATSystem system)
		{
			_system = system;
		}
		public static Kindred.Common.Security.NameEmailPair[] GetEmailRecipients(ITATSystem system, List<string> roleNames, List<int> facIDs)
		{
			//transform role names into security group names
			List<string> applicationResourceNames = SecurityHelper.ResourceNamesFromRoleNames(system, roleNames);
			ReadOnlyCollection<string> groupNames = Kindred.Common.Security.SecurityInfo.GetResourceGroups(system.ApplicationSecurityName, applicationResourceNames);
			Kindred.Common.Security.NameEmailPair[] emailRecipients = Kindred.Common.Security.EmailHelper.GetEmailRecipients(groupNames, facIDs);
			return emailRecipients;
		}
 public DataStoreDefinition(ITATSystem system)
 {
     _system = system;
 }
示例#26
0
		public byte[] GetContents(ITATSystem itatSystem, out string contentType)
		{
			Utility.DocumentStorage documentStorageObject = Utility.DocumentStorage.GetDocumentStorageObject(itatSystem.DocumentStorageType);
			documentStorageObject.RootPath = itatSystem.DocumentStorageRootPath;
			return documentStorageObject.GetDocument(itatSystem.ID, _documentStoreID, out contentType);
		}
        public static DataStoreDefinition GetDataStoreDefinitionByID(
            Guid dataStoreDefinitionID, 
            ITATSystem system, 
            Dictionary<Guid, Dictionary<Guid, string>> termNameLookup, 
            Dictionary<Guid /*TemplateID*/, Dictionary<Guid /*ComplexListID*/, Dictionary<Guid /*FieldID*/, string /*FieldName*/>>> fieldNameLookup,
            bool testTermName)
        {
            DataStoreDefinition rtn = null;
            DataTable dataStoreDef = Data.DataStoreDefinitions.GetDataStoreDefinitionsByDefinitionID(dataStoreDefinitionID);
            if (dataStoreDef.Rows.Count > 0)
            {
                try 
                {
                    rtn = new DataStoreDefinition((Guid)dataStoreDef.Rows[0][StoreNames._C_DEFINITION_ID], system);
                    rtn.Name = dataStoreDef.Rows[0][StoreNames._C_DEFINITION_NAME].ToString();
                    if (dataStoreDef.Rows[0][StoreNames._C_DESCRIPTION] == DBNull.Value)
                        rtn.Description = string.Empty;
                    else
                        rtn.Description = dataStoreDef.Rows[0][StoreNames._C_DESCRIPTION].ToString();
                    rtn.SystemID = (Guid)dataStoreDef.Rows[0][StoreNames._C_SYSTEM_ID];
                    if (dataStoreDef.Rows[0][StoreNames._C_LASTRUNDATE] == DBNull.Value)
                        rtn.LastRunDate = null;
                    else
                        rtn.LastRunDate = DateTime.Parse(dataStoreDef.Rows[0][StoreNames._C_LASTRUNDATE].ToString());
                    rtn.Definition = dataStoreDef.Rows[0][StoreNames._C_DEFINITION].ToString();
                    rtn.Active = Convert.ToBoolean(dataStoreDef.Rows[0][StoreNames._C_ACTIVE].ToString());
                    rtn.DataStoreConfig = new DataStoreConfig(dataStoreDef.Rows[0][StoreNames._C_DEFINITION].ToString(), rtn.SystemID, termNameLookup, fieldNameLookup,testTermName);
                    
                    if (dataStoreDef.Rows[0][StoreNames._C_DEFINITIONFILEPATH] == DBNull.Value)
                        rtn.DefinitionFilePath = string.Empty;
                    else
                        rtn.DefinitionFilePath = dataStoreDef.Rows[0][StoreNames._C_DEFINITIONFILEPATH].ToString();
                }
                catch (Exception ex)
                {
                    throw ex;
                }

            }


            return rtn;

        }
示例#28
0
 public void RefreshInterfaceConfig(ITATSystem system)
 {
     _interfaceConfig = system.FindExternalInterfaceConfig(_interfaceConfig.Name);
 }