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

            foreach (Indico.DAL.EmbroideryDetailsView o in oList)
            {
                Indico.BusinessObjects.EmbroideryDetailsViewBO obj = new Indico.BusinessObjects.EmbroideryDetailsViewBO(o);
                rList.Add(obj);
            }
            return(rList);
        }
コード例 #2
0
 internal void SetBO(Indico.BusinessObjects.EmbroideryDetailsViewBO obj)
 {
     // set this Indico.BusinessObjects.EmbroideryDetailsViewBO properties
     this.Embroidery       = obj.Embroidery;
     this.EmbStrikeOffDate = obj.EmbStrikeOffDate;
     this.JobName          = obj.JobName;
     this.Distributor      = obj.Distributor;
     this.Client           = obj.Client;
     this.Coordinator      = obj.Coordinator;
     this.Product          = obj.Product;
     this.PhotoRequiredBy  = obj.PhotoRequiredBy;
     this.Creator          = obj.Creator;
     this.CreatedDate      = obj.CreatedDate;
     this.Modifier         = obj.Modifier;
     this.ModifiedDate     = obj.ModifiedDate;
     this.Assign           = obj.Assign;
 }
コード例 #3
0
        /// <summary>
        /// Deserializes Indico.BusinessObjects.EmbroideryDetailsViewBO object from an XML representation
        /// </summary>
        /// <param name="strXML">a XML string serialized representation</param>
        public Indico.BusinessObjects.EmbroideryDetailsViewBO DeserializeObject(string strXML)
        {
            Indico.BusinessObjects.EmbroideryDetailsViewBO 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.EmbroideryDetailsViewBO)x.Deserialize(objStream);
            objStream.Close();
            return(objTemp);
        }