private object[] UpdateMaster(EDiaDescanso entity)
        {
            IDOUpdate objDO = new RHDOMnt.DiaDescanso();

             if (entity.EntityState == EntityState.Unchanged)
            return null;

             object[] objRet = null;

             switch (entity.EntityState)
             {

            case EntityState.Added:
               objRet = objDO.Insert(entity);
               break;

            case EntityState.Modified:
               if (entity.StAnulado == ConstFlagEstado.DESACTIVADO)
                  objDO.Update(entity);
               else
                  objDO.Delete(entity);
               break;

            case EntityState.Deleted:
               objDO.Delete(entity);
               break;

             }

             return objRet;
        }
        private ArrayList BuildParamInterface(EDiaDescanso value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, value.IdPeriodo));
             arrPrm.Add(DataHelper.CreateParameter("@pfeDiaDescanso", SqlDbType.DateTime, value.FeDiaDescanso));

             return arrPrm;
        }
        private void DeleteMaster(EDiaDescanso entity)
        {
            IDOUpdate objDO = new RHDOMnt.DiaDescanso();

             if (entity.EntityState == EntityState.Unchanged)
            return;

             objDO.Delete(entity);
        }