Esempio n. 1
0
 ///<summary>
 ///Get conditions by object with Multi-TokenType.
 ///</summary>
 public static ParameterCollection GetConditionsByObject(DO_BigDate.UO_BigDate parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary<DO_BigDate.Columns, TokenTypes> extTokens)
 {
     ParameterCollection objectConditions = new ParameterCollection();
     TokenTypes tt = tokenTypes;
     ParameterType pt = isAnd ? ParameterType.And : ParameterType.Or;
     if (!string.IsNullOrEmpty(parameterObj.BigDateCode))
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.BigDateCode, extTokens), DO_BigDate.Columns.BigDateCode, parameterObj.BigDateCode);
     }
     if (!string.IsNullOrEmpty(parameterObj.BigDateName))
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.BigDateName, extTokens), DO_BigDate.Columns.BigDateName, parameterObj.BigDateName);
     }
     if (parameterObj.CreateOn != DateTime.MinValue)
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.CreateOn, extTokens), DO_BigDate.Columns.CreateOn, parameterObj.CreateOn);
     }
     if (!string.IsNullOrEmpty(parameterObj.CreateBy))
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.CreateBy, extTokens), DO_BigDate.Columns.CreateBy, parameterObj.CreateBy);
     }
     if (parameterObj.UpdateOn != DateTime.MinValue)
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.UpdateOn, extTokens), DO_BigDate.Columns.UpdateOn, parameterObj.UpdateOn);
     }
     if (!string.IsNullOrEmpty(parameterObj.UpdateBy))
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.UpdateBy, extTokens), DO_BigDate.Columns.UpdateBy, parameterObj.UpdateBy);
     }
     if (parameterObj.BigDate != DateTime.MinValue)
     {
         objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_BigDate.Columns.BigDate, extTokens), DO_BigDate.Columns.BigDate, parameterObj.BigDate);
     }
     return objectConditions;
 }
Esempio n. 2
0
 ///<summary>
 ///Get all records count.
 ///</summary>
 public static int GetAllRecordsCount()
 {
     DO_BigDate da = new DO_BigDate();
     return da.GetRecordsCount();
 }
Esempio n. 3
0
 ///<summary>
 ///Delete object by primary key(with transation).
 ///</summary>
 public static int Delete(string BigDateCode, IDbConnection connection, IDbTransaction transaction)
 {
     DO_BigDate da = new DO_BigDate();
     return da.Delete(connection, transaction, GetConditionsByPrimaryKey(BigDateCode));
 }
Esempio n. 4
0
 ///<summary>
 ///Get all records.
 ///</summary>
 public static DO_BigDate.UOList_BigDate GetAllList()
 {
     DO_BigDate da = new DO_BigDate();
     return da.GetAllList();
 }
Esempio n. 5
0
 ///<summary>
 ///Get the tokenType of the column of condition query.
 ///</summary>
 private static TokenTypes GetColumnTokenType(TokenTypes defaultTokenType, DO_BigDate.Columns column, Dictionary<DO_BigDate.Columns, TokenTypes> extTokens)
 {
     if (extTokens != null && extTokens.ContainsKey(column))
         return extTokens[column];
     else
         return defaultTokenType;
 }
Esempio n. 6
0
 ///<summary>
 ///Delete object by primary key.
 ///</summary>
 public static int Delete(string BigDateCode)
 {
     DO_BigDate da = new DO_BigDate();
     return da.Delete(GetConditionsByPrimaryKey(BigDateCode));
 }
Esempio n. 7
0
 ///<summary>
 ///Update object by primary key.
 ///</summary>
 public static bool UpdateObject(DO_BigDate.UO_BigDate obj, string BigDateCode)
 {
     return obj.Update(GetConditionsByPrimaryKey(BigDateCode)) > 0;
 }
Esempio n. 8
0
 ///<summary>
 ///Update object by primary key(with transation).
 ///</summary>
 public static bool UpdateObject(DO_BigDate.UO_BigDate obj, string BigDateCode, IDbConnection connection, IDbTransaction transaction)
 {
     return obj.Update(connection, transaction, GetConditionsByPrimaryKey(BigDateCode)) > 0;
 }
Esempio n. 9
0
 ///<summary>
 ///Get records count.
 ///</summary>
 public static int GetRecordsCount(DO_BigDate.UO_BigDate parameterObj)
 {
     return GetRecordsCount(parameterObj, true, TokenTypes.Equal, null);
 }
Esempio n. 10
0
 ///<summary>
 ///Get records count.
 ///</summary>
 public static int GetRecordsCount(DO_BigDate.UO_BigDate parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary<DO_BigDate.Columns, TokenTypes> extTokens)
 {
     DO_BigDate da = new DO_BigDate();
     return da.GetRecordsCount(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens));
 }
Esempio n. 11
0
 ///<summary>
 ///Get paging list.
 ///</summary>
 public static PagingResult<DO_BigDate.UO_BigDate, DO_BigDate.UOList_BigDate> GetPagingList(DO_BigDate.UO_BigDate parameterObj, int pageNumber, int pageSize, string sortBy, bool isAsc)
 {
     return parameterObj.GetPagingList(GetConditionsByObject(parameterObj, true, TokenTypes.Like, null), pageNumber, pageSize, sortBy, isAsc);
 }
Esempio n. 12
0
 ///<summary>
 ///Get paging list.
 ///</summary>
 public static PagingResult<DO_BigDate.UO_BigDate, DO_BigDate.UOList_BigDate> GetPagingList(DO_BigDate.UO_BigDate parameterObj, int pageNumber, int pageSize, string sortBy, bool isAsc, bool isAnd, TokenTypes tokenTypes, Dictionary<DO_BigDate.Columns, TokenTypes> extTokens)
 {
     return parameterObj.GetPagingList(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens), pageNumber, pageSize, sortBy, isAsc);
 }
Esempio n. 13
0
 ///<summary>
 ///Get object by primary key.
 ///</summary>
 public static DO_BigDate.UO_BigDate GetObject(string BigDateCode)
 {
     DO_BigDate da = new DO_BigDate();
     DO_BigDate.UOList_BigDate l = da.GetList(GetConditionsByPrimaryKey(BigDateCode));
     return l.Count > 0 ? l[0] : null;
 }
Esempio n. 14
0
 ///<summary>
 ///Get list by object.
 ///</summary>
 public static DO_BigDate.UOList_BigDate GetList(DO_BigDate.UO_BigDate parameterObj)
 {
     return GetList(parameterObj, true, TokenTypes.Equal, null);
 }
Esempio n. 15
0
 ///<summary>
 ///Get list by object.
 ///</summary>
 public static DO_BigDate.UOList_BigDate GetList(DO_BigDate.UO_BigDate parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary<DO_BigDate.Columns, TokenTypes> extTokens)
 {
     return parameterObj.GetList(GetConditionsByObject(parameterObj, isAnd, tokenTypes, extTokens));
 }