internal void SetBO(Indico.BusinessObjects.SupplierDetailsViewBO obj) { // set this Indico.BusinessObjects.SupplierDetailsViewBO properties this.Supplier = obj.Supplier; this.Name = obj.Name; this.CountryID = obj.CountryID; this.Country = obj.Country; this.IsAccessoriesWherethisSupplier = obj.IsAccessoriesWherethisSupplier; this.IsFabricCodesWherethisSupplier = obj.IsFabricCodesWherethisSupplier; }
private static List <Indico.BusinessObjects.SupplierDetailsViewBO> IQueryableToList(IQueryable <Indico.DAL.SupplierDetailsView> oQuery) { List <Indico.DAL.SupplierDetailsView> oList = oQuery.ToList(); List <Indico.BusinessObjects.SupplierDetailsViewBO> rList = new List <Indico.BusinessObjects.SupplierDetailsViewBO>(oList.Count); foreach (Indico.DAL.SupplierDetailsView o in oList) { Indico.BusinessObjects.SupplierDetailsViewBO obj = new Indico.BusinessObjects.SupplierDetailsViewBO(o); rList.Add(obj); } return(rList); }
/// <summary> /// Deserializes Indico.BusinessObjects.SupplierDetailsViewBO object from an XML representation /// </summary> /// <param name="strXML">a XML string serialized representation</param> public Indico.BusinessObjects.SupplierDetailsViewBO DeserializeObject(string strXML) { Indico.BusinessObjects.SupplierDetailsViewBO objTemp = null; System.Xml.XmlDocument objXML = new System.Xml.XmlDocument(); objXML.LoadXml(strXML); System.Text.Encoding encoding = System.Text.Encoding.UTF8; System.IO.MemoryStream objStream = new System.IO.MemoryStream(); byte[] b = encoding.GetBytes(objXML.OuterXml); objStream.Write(b, 0, (int)b.Length); objStream.Position = 0; System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(this.GetType()); objTemp = (Indico.BusinessObjects.SupplierDetailsViewBO)x.Deserialize(objStream); objStream.Close(); return(objTemp); }