public void EditDataDetails(DataDetails dataDetails) { var oldData = _dataUnitOfWork.DataDetailsRepository.GetById(dataDetails.Id); oldData.Status = dataDetails.Status; _dataUnitOfWork.Save(); }
private void UpdateStatus(DataDetails dataDetails) { dataDetails.Id = dataDetails.Id; dataDetails.Status = "Complete"; dataDetails.FileName = dataDetails.FileName; _dataDetailsService.EditDataDetails(dataDetails); }
public override global::System.Data.DataSet Clone() { DataDetails cln = ((DataDetails)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
public void AddDataDetails(DataDetails dataDetails) { if (dataDetails == null || string.IsNullOrWhiteSpace(dataDetails.FileName)) { throw new InvalidOperationException("Data File name is missing"); } _dataUnitOfWork.DataDetailsRepository.Add(dataDetails); _dataUnitOfWork.Save(); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { DataDetails ds = new DataDetails(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
//Added By FQ public DataObjects GetDataObjectDD(int objectID, dynamic DOdictionary) { ScriptObject Dob = GetDataObjectbyID(objectID); DataObjects DO = new DataObjects(); DO.DOID = Dob.ScriptObjectID; DO.DOName = Dob.ObjectName; if (!Dob.IsCollection) { DO.Details = FillDetails(Dob.ScriptObjectID); DO.DictionaryMatch(DOdictionary); } else { List <DataObjects> theObs = new List <DataObjects>(); Int32 thecount = 0; foreach (dynamic dyndet in DOdictionary) { thecount++; DataObjects doS = GetDataObjectDD(DO.DOName, dyndet); theObs.Add(doS); } DataDetails[] subdets = new DataDetails[thecount]; for (int i = 0; i < thecount; i++) { DataDetails d1 = new DataDetails(); d1.SubDetails = new DataDetails[theObs[i].Details.Length]; theObs[i].Details.CopyTo(d1.SubDetails, 0); subdets[i] = d1; } DO.Details = subdets; } return(DO); }
public DataObjects GetDataObjectDD(string objectname, dynamic DOdictionary) { List <string> doParts = Regex.Split(objectname, "\\.").ToList(); ScriptObject Dob = GetDataObject(doParts[0]); DataObjects DO = new DataObjects(); DO.DOID = Dob.ScriptObjectID; DO.DOName = Dob.ObjectName; DO.Details = FillDetails(Dob.ScriptObjectID); if (doParts.Count > 1) { DataDetails thisDataDetail = ReturnObjectDetail(DO.Details, objectname); } else { DO.DictionaryMatch(DOdictionary); } return(DO); }
public ResultViewModel <DataDetails> GetByID(int ID, int Level, int PageSize, int PageIndex) { ResultViewModel <DataDetails> result = new ResultViewModel <DataDetails>(); DataDetails details = new DataDetails(); int count = 0; try { switch (Level) { case 1: details.LevelDetails = mainCategoryService.GetByID(ID); details.Childs = subCategoryService.GetByParentID(out count, ID, PageIndex, PageSize).Select(i => i.ToHomeViewmodel()).ToList(); break; case 2: details.LevelDetails = subCategoryService.GetByID(ID); details.Childs = trackService.GetByParentID(out count, ID, PageIndex, PageSize).Select(i => i.ToHomeViewmodel()).ToList(); break; case 3: details.LevelDetails = trackService.GetByID(ID).ToViewModel(); details.Childs = courseService.GetByParentID(out count, ID, PageIndex, PageSize).Select(i => i.ToHomeViewmodel()).ToList(); //details.Childs = trackService.GetByID(ID).Courses.Select(i => i.Course.ToViewModel().ToHomeViewmodel()).ToList(); break; } result.Data = details; result.Successed = true; result.Count = count; } catch (Exception ex) { result.Successed = false; result.Message = "Something Went Wrong !!"; } return(result); }
private DataDetails[] FillDetails(Int32 theID) { var doDetails = db.ScriptObjectDetails .Where(dataObjectDetails => dataObjectDetails.ScriptObjectID == theID) .Select(ret => new { ret.ObjectDetailName, ret.ObjectDetailDataType, ret.Sequence, }) .OrderBy(ob => ob.Sequence); if (doDetails != null) { List <DataDetails> ddList = new List <DataDetails>(); foreach (var dodetail in doDetails) { DataDetails DD = new DataDetails(); DD.DetailName = dodetail.ObjectDetailName; DD.DetailID = System.Convert.ToInt32(dodetail.Sequence); DD.DetailType = dodetail.ObjectDetailDataType; //if (dodetail.InheritedID != null) //{ // DD.InheritedID = Convert.ToInt32(dodetail.InheritedID); //} //try //{ // DD.Collection = (bool)dodetail.Collection; //} //catch //{ // DD.Collection = false; //} //if (DD.Collection) //{ // if (dodetail.DetailType == "Object") // { // DD.DetailType = dodetail.DetailType; // } // else // { // DD.DetailType = dodetail.DetailType; // } //} //else //{ // if (dodetail.DetailType == "Object") // { // DD.DetailType = dodetail.DetailType; // DataDetails[] ddets = FillDetails(System.Convert.ToInt32(dodetail.InheritedID)); // DD.SubDetails = ddets; // } // else // { // DD.DetailType = dodetail.DetailType; // } //} ddList.Add(DD); } DataDetails[] DO = new DataDetails[ddList.Count]; ddList.CopyTo(DO); return(DO); } return(null); }
public DynamicTestVariableSelector(DataDetails marketDetails) { DataStartDate = marketDetails.StartDate; DataEndDate = marketDetails.EndDate; TestStartDate = DataEndDate; }