Beispiel #1
0
 public static ELeavePlan GetObject(DatabaseConnection dbConn, object ID)
 {
     if (ID is int)
     {
         ELeavePlan obj = new ELeavePlan();
         obj.LeavePlanID = (int)ID;
         if (db.select(dbConn, obj))
         {
             return(obj);
         }
     }
     return(null);
 }
Beispiel #2
0
        // Start 0000006, Miranda, 2014-06-16
        public ELeavePlan Copy(DatabaseConnection dbConn)
        {
            ELeavePlan obj = new ELeavePlan();

            obj.LeavePlanID = LeavePlanID;
            if (ELeavePlan.db.select(dbConn, obj))
            {
                obj.LeavePlanID   = 0;
                obj.LeavePlanCode = obj.LeavePlanCode + "_COPY";
                obj.LeavePlanDesc = "Copy of " + obj.LeavePlanDesc;

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