Example #1
0
        public int Save(ILeavePeriod leavePeriod)
        {
            exp_Data = new DataAccess.ExceptionLeavePeriod(Connection);
            var ExceptionLeavePeriod = (ExceptionalLeavePeriod)leavePeriod;

            leavePeriod.LeavePeriodID = exp_Data.Save(ExceptionLeavePeriod.ClientID,
                                                      ExceptionLeavePeriod.UserID,
                                                      (int)ExceptionLeavePeriod.Type,
                                                      ExceptionLeavePeriod.StartDate,
                                                      ExceptionLeavePeriod.EndDate,
                                                      ExceptionLeavePeriod.IsCurrentPeriod,
                                                      ExceptionLeavePeriod.IsNextPeriod,
                                                      ExceptionLeavePeriod.PreviousLeave,
                                                      ExceptionLeavePeriod.ActionBy,
                                                      ExceptionLeavePeriod.LeaveType
                                                      );
            if (leavePeriod.LeavePeriodID > 0)
            {
                return(leavePeriod.LeavePeriodID);
            }
            else
            {
                return(-1);
            }
        }
Example #2
0
        public bool Update(ILeavePeriod leavePeriod)
        {
            exp_Data = new DataAccess.ExceptionLeavePeriod(Connection);
            var ExceptionLeavePeriod = (ExceptionalLeavePeriod)leavePeriod;
            var result = exp_Data.Update(ExceptionLeavePeriod.LeavePeriodID, ExceptionLeavePeriod.ClientID,
                                         ExceptionLeavePeriod.UserID,
                                         (int)ExceptionLeavePeriod.Type,
                                         ExceptionLeavePeriod.StartDate,
                                         ExceptionLeavePeriod.EndDate,
                                         ExceptionLeavePeriod.IsCurrentPeriod,
                                         ExceptionLeavePeriod.IsNextPeriod,
                                         ExceptionLeavePeriod.PreviousLeave,
                                         ExceptionLeavePeriod.ActionBy,
                                         ExceptionLeavePeriod.LeaveType
                                         );

            return(result);
        }
Example #3
0
        public int Save(ILeavePeriod leavePeriod)
        {
            exp_Data = new DataAccess.LeavePeriod(Connection);
            var orgLeavePeriod = (OrganizationLeavePeriod)leavePeriod;

            leavePeriod.LeavePeriodID = exp_Data.Save(orgLeavePeriod.ClientID,
                                                      orgLeavePeriod.StartDate,
                                                      orgLeavePeriod.EndDate,
                                                      orgLeavePeriod.IsCurrentPeriod,
                                                      orgLeavePeriod.IsNextPeriod,
                                                      orgLeavePeriod.PreviousLeave,
                                                      orgLeavePeriod.Year
                                                      );
            if (leavePeriod.LeavePeriodID > 0)
            {
                return(leavePeriod.LeavePeriodID);
            }
            else
            {
                return(-1);
            }
        }
Example #4
0
 public bool Update(ILeavePeriod leavePeriod)
 {
     exp_Data = new DataAccess.LeavePeriod(Connection);
     throw new NotImplementedException();
 }