Exemple #1
0
 /// <summary>
 /// Get the mobile business object by surrogate key.
 /// </summary>
 /// <param name="id">surrogate key</param>
 /// <returns>the mobile business object for the surroget key</returns>
 /// <exception cref="ObjectNotFoundException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static YPF.Comercial.RRCC.SUP.OfflineAuthentication Load(string id)
 {
     YPF.Comercial.RRCC.SUP.OfflineAuthentication _ent = Find(id);
     if (_ent == null)
     {
         throw new Sybase.Persistence.ObjectNotFoundException();
     }
     return(_ent);
 }
Exemple #2
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object, bool __buildGraph, bool _includeBigAttribute, bool _includeUserAttributes)
 {
     if ((_object == null))
     {
         return(null);
     }
     else
     {
         return(_object._toJSON(__buildGraph, _includeBigAttribute, _includeUserAttributes));
     }
 }
Exemple #3
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object, bool _includeBigAttribute)
 {
     if (_includeBigAttribute)
     {
         return(YPF.Comercial.RRCC.SUP.OfflineAuthentication.ToJSON(_object));
     }
     else
     {
         return(YPF.Comercial.RRCC.SUP.OfflineAuthentication.ToJSONWithoutBigAttribute(_object));
     }
 }
Exemple #4
0
 /// <summary>
 /// Set current MBO attributes by specified MBO.
 /// </summary>
 public static YPF.Comercial.RRCC.SUP.OfflineAuthentication Merge(YPF.Comercial.RRCC.SUP.OfflineAuthentication entity)
 {
     YPF.Comercial.RRCC.SUP.OfflineAuthentication ent = Find(entity._pk());
     if (ent == null)
     {
         ent = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
     }
     ent.CopyAll(entity);
     ent.Save();
     return(ent);
 }
Exemple #5
0
        /// <summary>
        /// Refresh the mobile business object from database.
        /// </summary>
        public void Refresh()
        {
            if (!_isNew)
            {
                YPF.Comercial.RRCC.SUP.OfflineAuthentication ent = Load(_pk());
                CopyAll(ent);

                _isNew   = false;
                _isDirty = false;
            }
        }
Exemple #6
0
 internal static YPF.Comercial.RRCC.SUP.OfflineAuthentication FromJSON(object _json)
 {
     if (_json == null)
     {
         return(null);
     }
     else
     {
         YPF.Comercial.RRCC.SUP.OfflineAuthentication _obj = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
         _obj._fromJSON((com.sybase.afx.json.JsonObject)_json);
         return(_obj);
     }
 }
Exemple #7
0
        /// <summary>
        /// override method
        /// </summary>
        public override bool Equals(object that)
        {
            YPF.Comercial.RRCC.SUP.OfflineAuthentication that_1 = that as YPF.Comercial.RRCC.SUP.OfflineAuthentication;
            if (that_1 == null)
            {
                return(false);
            }
            string id_2 = this._pk();
            string id_3 = that_1._pk();

            if ((id_2 == null) || (id_3 == null))
            {
                return(false);
            }
            return(id_2.Equals(id_3));
        }
Exemple #8
0
        private static YPF.Comercial.RRCC.SUP.OfflineAuthentication _find(string id, String sql, bool findOs, bool findNonPending)
        {
            Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
            System.Data.IDataReader _rs = null;
            int count = 0;

            try
            {
                YPF.Comercial.RRCC.SUP.OfflineAuthentication _rt = null;
                System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
                com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user", id);
                _rs = ps.ExecuteReader();
                Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
                while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs))
                {
                    _rt = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
                    _rt.Bind(profile, _rs);
                    count++;
                }
                if (_rs != null)
                {
                    com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count);
                }
                if (ps != null)
                {
                    ps.Dispose();
                }
                return(_rt);
            }
            catch (System.Data.DataException ex)
            {
                throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
            }
            finally
            {
                YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
            }
        }
 private static YPF.Comercial.RRCC.SUP.OfflineAuthentication _find(string id, String sql, bool findOs, bool findNonPending)
 {
     Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
     System.Data.IDataReader _rs = null;
     int count = 0;
     try
     {
         YPF.Comercial.RRCC.SUP.OfflineAuthentication _rt = null;
         System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
         com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user", id);
         _rs = ps.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs))
         {
             _rt = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
             _rt.Bind(profile, _rs);
             count++;
         }
         if (_rs != null) com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count);
         if (ps != null) ps.Dispose();
         return _rt;
     }
     catch(System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }
Exemple #10
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object, bool __buildGraph, bool _includeBigAttribute)
 {
     return(ToJSON(_object, __buildGraph, _includeBigAttribute, true));
 }
Exemple #11
0
 internal static com.sybase.afx.json.JsonObject ToJSON(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object)
 {
     return(YPF.Comercial.RRCC.SUP.OfflineAuthentication.ToJSON(_object, false, true, true));
 }
Exemple #12
0
 internal static com.sybase.afx.json.JsonObject ToJSONWithoutUserAttributes(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object)
 {
     return(YPF.Comercial.RRCC.SUP.OfflineAuthentication.ToJSON(_object, false, false, false));
 }
Exemple #13
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.OfflineAuthentication entity)
 {
     this._isNew         = entity._isNew;
     this.__passwordHash = entity.__passwordHash;
     this.__user         = entity.__user;
 }
Exemple #14
0
 private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.OfflineAuthentication __theObject)
 {
     System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
     com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "passwordHash", __theObject.PasswordHash);
     com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user", __theObject.User);
     ps.ExecuteNonQuery();
     ps.Dispose();;
 }
 /// <summary>
 /// Set current MBO attributes by specified MBO.
 /// </summary>
 public static YPF.Comercial.RRCC.SUP.OfflineAuthentication Merge(YPF.Comercial.RRCC.SUP.OfflineAuthentication entity)
 {
     YPF.Comercial.RRCC.SUP.OfflineAuthentication ent = Find(entity._pk());
     if (ent == null)
     {
         ent = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
     }
     ent.CopyAll(entity);
     ent.Save();
     return ent;
 }
 internal static YPF.Comercial.RRCC.SUP.OfflineAuthentication FromJSON(object _json)
 {
     if (_json == null)
     {
         return null;
     }
     else
     {
         YPF.Comercial.RRCC.SUP.OfflineAuthentication _obj = new YPF.Comercial.RRCC.SUP.OfflineAuthentication();
         _obj._fromJSON((com.sybase.afx.json.JsonObject)_json);
         return _obj;
     }
 }
Exemple #17
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public static com.sybase.afx.json.JsonObject __toJSON(YPF.Comercial.RRCC.SUP.OfflineAuthentication _object)
 {
     return(YPF.Comercial.RRCC.SUP.OfflineAuthentication.ToJSON(_object));
 }