コード例 #1
0
        private static List <Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO> IQueryableToList(IQueryable <Indico.DAL.DistributorPatternPriceLevelCostView> oQuery)
        {
            List <Indico.DAL.DistributorPatternPriceLevelCostView> oList = oQuery.ToList();
            List <Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO> rList = new List <Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO>(oList.Count);

            foreach (Indico.DAL.DistributorPatternPriceLevelCostView o in oList)
            {
                Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO obj = new Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO(o);
                rList.Add(obj);
            }
            return(rList);
        }
コード例 #2
0
 internal void SetBO(Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO obj)
 {
     // set this Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO properties
     this.ID             = obj.ID;
     this.Price          = obj.Price;
     this.PriceLevel     = obj.PriceLevel;
     this.FactoryCost    = obj.FactoryCost;
     this.IndimanCost    = obj.IndimanCost;
     this.Distributor    = obj.Distributor;
     this.Markup         = obj.Markup;
     this.EditedCIFPrice = obj.EditedCIFPrice;
     this.EditedFOBPrice = obj.EditedFOBPrice;
     this.ModifiedDate   = obj.ModifiedDate;
 }
コード例 #3
0
        /// <summary>
        /// Deserializes Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO object from an XML representation
        /// </summary>
        /// <param name="strXML">a XML string serialized representation</param>
        public Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO DeserializeObject(string strXML)
        {
            Indico.BusinessObjects.DistributorPatternPriceLevelCostViewBO 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.DistributorPatternPriceLevelCostViewBO)x.Deserialize(objStream);
            objStream.Close();
            return(objTemp);
        }