Ejemplo n.º 1
0
        public virtual object GetDeletedObjectByID(int iObjectID)
        {
            DbCommand storedProcedure = SqlDatabaseHelper.GetStoredProcedure(this.GenerateSelectDeletedByPrimayKeyStoredProcedureName());

            SqlDatabaseHelper.AddInParameter(storedProcedure, SqlDatabaseHelper.GetPrimaryKeyColumn(this.TableName), SqlDbType.Int, (object)iObjectID);
            DataSet dataSet = SqlDatabaseHelper.RunStoredProcedure(storedProcedure);

            if (dataSet.Tables.Count <= 0)
            {
                return((object)null);
            }
            return(SqlDatabaseHelper.GetSingleObject(dataSet.Tables[0], this.ObjectType));
        }
Ejemplo n.º 2
0
 public virtual object GetObjectByNo(string strObjectNo)
 {
     try
     {
         DataSet dataSet = SqlDatabaseHelper.RunStoredProcedure(this.GenerateSelectByNoStoredProcedureName(), (object)strObjectNo);
         if (dataSet.Tables.Count > 0)
         {
             return(SqlDatabaseHelper.GetSingleObject(dataSet.Tables[0], this.ObjectType));
         }
     }
     catch (Exception ex)
     {
         return((object)null);
     }
     return((object)null);
 }
Ejemplo n.º 3
0
 public object GetSingleObject(DataTable dt)
 {
     return(SqlDatabaseHelper.GetSingleObject(dt, this.ObjectType));
 }