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

            foreach (Indico.DAL.ReturnWeeklySummaryView o in oList)
            {
                Indico.BusinessObjects.ReturnWeeklySummaryViewBO obj = new Indico.BusinessObjects.ReturnWeeklySummaryViewBO(o);
                rList.Add(obj);
            }
            return(rList);
        }
コード例 #2
0
 internal void SetBO(Indico.BusinessObjects.ReturnWeeklySummaryViewBO obj)
 {
     // set this Indico.BusinessObjects.ReturnWeeklySummaryViewBO properties
     this.CompanyName              = obj.CompanyName;
     this.Qty                      = obj.Qty;
     this.ShipmentMode             = obj.ShipmentMode;
     this.ShipmentModeID           = obj.ShipmentModeID;
     this.DistributorClientAddress = obj.DistributorClientAddress;
     this.PaymentMethod            = obj.PaymentMethod;
     this.InvoiceStatus            = obj.InvoiceStatus;
     this.ShipmentDate             = obj.ShipmentDate;
     this.Invoice                  = obj.Invoice;
     this.Country                  = obj.Country;
 }
コード例 #3
0
        /// <summary>
        /// Deserializes Indico.BusinessObjects.ReturnWeeklySummaryViewBO object from an XML representation
        /// </summary>
        /// <param name="strXML">a XML string serialized representation</param>
        public Indico.BusinessObjects.ReturnWeeklySummaryViewBO DeserializeObject(string strXML)
        {
            Indico.BusinessObjects.ReturnWeeklySummaryViewBO 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.ReturnWeeklySummaryViewBO)x.Deserialize(objStream);
            objStream.Close();
            return(objTemp);
        }