public static ProjectDataType MapProject(NamedNullMappingDataReader readerEx) { ProjectDataType project = new ProjectDataType(); project.ProjectIdentifier = readerEx.GetString("PROJECTID"); project.ProjectName = readerEx.GetString("PROJECTNAME"); project.ProjectDescriptionText = readerEx.GetNullString("PROJECTDESC"); project.SamplingDesignTypeCode = readerEx.GetNullString("SAMPLINGDESIGNTYPECODE"); project.QAPPApprovedIndicatorSpecified = !readerEx.IsDBNull("QAPPAPPROVEDIND"); if (project.QAPPApprovedIndicatorSpecified) { project.QAPPApprovedIndicator = ToBool(readerEx.GetString("QAPPAPPROVEDIND")); } project.QAPPApprovalAgencyName = readerEx.GetNullString("QAPPAPPROVALAGENCYNAME"); return(project); }
/// <summary> /// This will set the data for the first time as either Public or Private depending on passed type (Public is default). If data already exists at the key it will attempt to update the data and ignore the passed project data type. If you intend to override an argument the 4th param can be used to ensure overriden /// </summary> /// <param name="key">The key to set</param> /// <param name="value">The value to set</param> /// <param name="type">The type of data being set</param> /// <param name="overrideNonDefaultArgument">Override argument data if it is not default</param> /// <returns></returns> public ProjectData Set(string key, object value, ProjectDataType type = ProjectDataType.Public, bool overrideNonDefaultArgument = false) { if (ContainsKey(key)) { Update(key, value, overrideNonDefaultArgument); } else if (type == ProjectDataType.Public) { _internalData[key] = value; } else { _privateData[key] = value; } return(this); }
public ProjectDataBase() { dataType = ProjectDataType.STRING; strRemark = ""; }