private static List <Indico.BusinessObjects.PriceLevelCostViewBO> IQueryableToList(IQueryable <Indico.DAL.PriceLevelCostView> oQuery) { List <Indico.DAL.PriceLevelCostView> oList = oQuery.ToList(); List <Indico.BusinessObjects.PriceLevelCostViewBO> rList = new List <Indico.BusinessObjects.PriceLevelCostViewBO>(oList.Count); foreach (Indico.DAL.PriceLevelCostView o in oList) { Indico.BusinessObjects.PriceLevelCostViewBO obj = new Indico.BusinessObjects.PriceLevelCostViewBO(o); rList.Add(obj); } return(rList); }
internal void SetBO(Indico.BusinessObjects.PriceLevelCostViewBO obj) { // set this Indico.BusinessObjects.PriceLevelCostViewBO properties this.ID = obj.ID; this.Pattern = obj.Pattern; this.FabricCode = obj.FabricCode; this.Number = obj.Number; this.NickName = obj.NickName; this.Item = obj.Item; this.SubItem = obj.SubItem; this.CoreCategory = obj.CoreCategory; this.FabricCodeName = obj.FabricCodeName; this.ItemSubCategory = obj.ItemSubCategory; this.OtherCategories = obj.OtherCategories; this.ConvertionFactor = obj.ConvertionFactor; this.EnableForPriceList = obj.EnableForPriceList; }
/// <summary> /// Deserializes Indico.BusinessObjects.PriceLevelCostViewBO object from an XML representation /// </summary> /// <param name="strXML">a XML string serialized representation</param> public Indico.BusinessObjects.PriceLevelCostViewBO DeserializeObject(string strXML) { Indico.BusinessObjects.PriceLevelCostViewBO 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.PriceLevelCostViewBO)x.Deserialize(objStream); objStream.Close(); return(objTemp); }