示例#1
0
 public static EPayrollPeriod GetObject(DatabaseConnection dbConn, int ID)
 {
     if (ID > 0)
     {
         EPayrollPeriod obj = new EPayrollPeriod();
         obj.PayPeriodID = ID;
         if (EPayrollPeriod.db.select(dbConn, obj))
         {
             return(obj);
         }
     }
     return(null);
 }
示例#2
0
        public EPayrollPeriod Copy(DatabaseConnection dbConn, int NewPayGroupID)
        {
            EPayrollPeriod obj = new EPayrollPeriod();

            obj.PayPeriodID = PayPeriodID;
            if (EPayrollPeriod.db.select(dbConn, obj))
            {
                obj.PayPeriodID             = 0;
                obj.PayPeriodConfirmBy      = 0;
                obj.PayPeriodConfirmDate    = new DateTime();
                obj.PayPeriodProcessEndBy   = 0;
                obj.PayPeriodProcessEndDate = new DateTime();
                obj.PayPeriodRollbackBy     = 0;
                obj.PayPeriodRollbackDate   = new DateTime();
                obj.PayPeriodStatus         = PAYPERIOD_STATUS_NORMAL_FLAG;
                obj.PayPeriodTrialRunBy     = 0;
                obj.PayPeriodTrialRunDate   = new DateTime();
                obj.PayGroupID = NewPayGroupID;

                EPayrollPeriod.db.insert(dbConn, obj);
                return(obj);
            }
            return(null);
        }