Beispiel #1
0
        /****************************************************************/

        #region EventDevice

        public static void O2Db(EventDevice obj, EFData.EventDevice dbObj)
        {
            dbObj.Name          = obj.Name;
            dbObj.Model         = obj.Model;
            dbObj.Mode          = obj.Mode;
            dbObj.Profile       = obj.Profile;
            dbObj.Remark        = obj.Remark;
            dbObj.MultiChannel  = obj.MultiChannel;
            dbObj.CanAddChannel = obj.CanAddChannel;
            dbObj.DotNetType    = obj.DotNetType;
        }
Beispiel #2
0
        public static void Db2O(EFData.EventDevice dbObj, out EventDevice obj)
        {
            obj         = (EventDevice)Activator.CreateInstance(Type.GetType(dbObj.DotNetType));
            obj.Id      = dbObj.Id;
            obj.Profile = dbObj.Profile;


            obj.Name          = dbObj.Name;
            obj.Model         = dbObj.Model;
            obj.OldMode       = dbObj.Mode;
            obj.Mode          = dbObj.Mode;
            obj.Remark        = dbObj.Remark;
            obj.MultiChannel  = dbObj.MultiChannel;
            obj.CanAddChannel = dbObj.CanAddChannel;
            obj.DotNetType    = dbObj.DotNetType;
        }