Esempio n. 1
0
        public override void FromEntityData(UFSoft.UBF.Business.DataTransObjectBase dto)
        {
            WSLogData data = dto as WSLogData;

            if (data == null)
            {
                return;
            }
            this.FromEntityData(data);
        }
Esempio n. 2
0
        /// <summary>
        /// Create EntityData From Entity - used by ubf
        /// </summary>
        public WSLogData ToEntityData(WSLogData data, IDictionary dict)
        {
            if (data == null)
            {
                data = new WSLogData();
            }

            if (dict == null)
            {
                dict = new Hashtable();
            }
            //就直接用ID,如果不同实体会出现相同ID,则到时候要改进。? ID一定要有。
            dict["UFIDA.U9.Cust.Pub.WSLogBE.WSLog" + this.ID.ToString()] = data;

            data.SysState = this.SysState;
            #region 组件外属性 -BusinessEntity,"简单值对象",简单类型,多语言.不可能存在一对多.没有集合可能.

            {
                object obj = this.GetValue("ID");
                if (obj != null)
                {
                    data.ID = (System.Int64)obj;
                }
            }


            {
                object obj = this.GetValue("CreatedOn");
                if (obj != null)
                {
                    data.CreatedOn = (System.DateTime)obj;
                }
            }


            {
                object obj = this.GetValue("CreatedBy");
                if (obj != null)
                {
                    data.CreatedBy = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("ModifiedOn");
                if (obj != null)
                {
                    data.ModifiedOn = (System.DateTime)obj;
                }
            }


            {
                object obj = this.GetValue("ModifiedBy");
                if (obj != null)
                {
                    data.ModifiedBy = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("SysVersion");
                if (obj != null)
                {
                    data.SysVersion = (System.Int64)obj;
                }
            }


            {
                object obj = this.GetValue("RequestUrl");
                if (obj != null)
                {
                    data.RequestUrl = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("ClassName");
                if (obj != null)
                {
                    data.ClassName = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("MethodName");
                if (obj != null)
                {
                    data.MethodName = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("StartTime");
                if (obj != null)
                {
                    data.StartTime = (System.DateTime)obj;
                }
            }


            {
                object obj = this.GetValue("EndTime");
                if (obj != null)
                {
                    data.EndTime = (System.DateTime)obj;
                }
            }


            {
                object obj = this.GetValue("ElapsedSecond");
                if (obj != null)
                {
                    data.ElapsedSecond = (System.Decimal)obj;
                }
            }


            {
                object obj = this.GetValue("RequestContent");
                if (obj != null)
                {
                    data.RequestContent = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("ResponseContent");
                if (obj != null)
                {
                    data.ResponseContent = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("ErrorMessage");
                if (obj != null)
                {
                    data.ErrorMessage = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("CallCount");
                if (obj != null)
                {
                    data.CallCount = (System.Int32)obj;
                }
            }


            {
                object obj = this.GetValue("MethodDescription");
                if (obj != null)
                {
                    data.MethodDescription = (System.String)obj;
                }
            }


            {
                object obj = this.GetValue("EnterpriseID");
                if (obj != null)
                {
                    data.EnterpriseID = (System.String)obj;
                }
            }

            #endregion

            #region 组件内属性 -Entity,"复杂值对象",枚举,实体集合.

            {
                object obj = this.GetValue("CallResult");
                if (obj != null)
                {
                    data.CallResult = System.Int32.Parse(obj.ToString());
                }
            }


            #endregion
            return(data);
        }
Esempio n. 3
0
        //used by ubf..
        public void FromEntityData(WSLogData data, IDictionary dict)
        {
            if (data == null)
            {
                return;
            }
            bool m_isNeedPersistable = this.NeedPersistable;

            this.NeedPersistable = false;

            //this.innerData.ChangeEventEnabled = false;
            //this.innerRelation.RelationEventEnabled = false;

            if (dict == null)
            {
                dict = new Hashtable();
            }
            dict[data]    = this;
            this.SysState = data.SysState;
            DeSerializeKey(data);
            #region 组件外属性

            //ID与系统字段不处理 --Sysversion需要处理。


            //ID与系统字段不处理 --Sysversion需要处理。


            //ID与系统字段不处理 --Sysversion需要处理。


            //ID与系统字段不处理 --Sysversion需要处理。


            //ID与系统字段不处理 --Sysversion需要处理。

            this.SetTypeValue("SysVersion", data.SysVersion);

            this.SetTypeValue("RequestUrl", data.RequestUrl);

            this.SetTypeValue("ClassName", data.ClassName);

            this.SetTypeValue("MethodName", data.MethodName);

            this.SetTypeValue("StartTime", data.StartTime);

            this.SetTypeValue("EndTime", data.EndTime);

            this.SetTypeValue("ElapsedSecond", data.ElapsedSecond);

            this.SetTypeValue("RequestContent", data.RequestContent);

            this.SetTypeValue("ResponseContent", data.ResponseContent);

            this.SetTypeValue("ErrorMessage", data.ErrorMessage);

            this.SetTypeValue("CallCount", data.CallCount);

            this.SetTypeValue("MethodDescription", data.MethodDescription);

            this.SetTypeValue("EnterpriseID", data.EnterpriseID);

            #endregion

            #region 组件内属性

            this.SetTypeValue("CallResult", data.CallResult);


            #endregion
            this.NeedPersistable = m_isNeedPersistable;
            dict[data]           = this;
        }
Esempio n. 4
0
 /// <summary>
 /// Copy Entity From EntityData
 /// </summary>
 public void FromEntityData(WSLogData data)
 {
     this.FromEntityData(data, new Hashtable());
 }
Esempio n. 5
0
 //反序化Key到Data的ID中 --由FromEntityData自动调用一次。实际可以分离,由跨组织服务去调用.
 private void DeSerializeKey(WSLogData data)
 {
     //Entity中没有EntityKey集合,不用处理。
 }