private void ImportTestShareClassData(DataRow row, DataContext dataContext) { string secId = row["SecId"].ToString(); if(!String.IsNullOrEmpty(secId)) { FundClassBasicGroup fundClassBasicGroup = new FundClassBasicGroup(dataContext, secId); FundClassBasicGroup.FundClassBasic fundClassBasic = fundClassBasicGroup.GetBasicRecordBySecId(secId); fundClassBasic.Status = 0; fundClassBasic.ObsoleteDate = DateTime.UtcNow.AddHours(-5); fundClassBasic.ObsoleteType = "J"; new OperationDataGroupContainer(fundClassBasicGroup).Save(); } }
private void ObsoleteIGSAShareClassData(DataRow row, DataContext dataContext) { string secId = row["SecId"].ToString(); if (!String.IsNullOrEmpty(secId)) { FundClassBasicGroup fundClassBasicGroup = new FundClassBasicGroup(dataContext, secId); FundClassBasicGroup.FundClassBasic fundClassBasic = fundClassBasicGroup.GetBasicRecordBySecId(secId); fundClassBasic.Status = 0; fundClassBasic.ObsoleteDate = DateTime.Parse("2012-06-22"); fundClassBasic.ObsoleteType = "J"; ArrayList listPrivateXml = new ArrayList(); InvestmentReadiness readiness = InvestmentReadiness.Parse(fundClassBasic.DataReadiness); readiness.IdentifierReadiness = (Readiness_t)Enum.Parse(typeof(Readiness_t), "0"); readiness.OperationReadiness = (Readiness_t)Enum.Parse(typeof(Readiness_t), "0"); PrivateXml docPrivate = PrivateXml.Load(secId, InvestmentType.DataType.Security); docPrivate.SetObsoleteReason("Junking IGSA database"); docPrivate.AddDataReadinessChangeReason("Junking IGSA database", "12247", readiness.Code); docPrivate.Save(); fundClassBasic.DataReadiness = readiness.Code; new OperationDataGroupContainer(fundClassBasicGroup).Save(); } }