public void ExportarVacaciones(IEntityBase entity)
 {
     RHDOMnt.ProcPlaHora objDO = new RHDOMnt.ProcPlaHora();
     objDO.ExportarVacaciones(entity);
 }
        private object[] UpdateMaster(EProcPlaHora entity)
        {
            IDOUpdate objDO = new RHDOMnt.ProcPlaHora();

            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 void DeleteMaster(EProcPlaHora entity)
        {
            IDOUpdate objDO = new RHDOMnt.ProcPlaHora();

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

            objDO.Delete(entity);
        }
        private string UpdateDetail(IList<EProcPlaHora> col, object[] primKey)
        {
            if (col == null)
                return "";

            IDOUpdate objDO = new RHDOMnt.ProcPlaHora();
            string strRet = "";

            string idPerson = "";

            foreach (EProcPlaHora objE in col)
            {

                object[] objRet = null;

                if (primKey != null)
                {
                    objE.IdPeriodo = primKey[0].ToString();
                }

                switch (objE.EntityState)
                {

                    case EntityState.Added:
                        objRet = objDO.Insert(objE);
                        if (int.Parse(objRet[0].ToString()) < 1)
                            if (objE.IdPersonal != idPerson && idPerson != "")
                                strRet += objE.IdPersonal + "\n";
                        break;

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

                }

                idPerson = objE.IdPersonal;
            }

            return strRet;
        }
        private void DeleteDetail(IList<EProcPlaHora> col, bool filterModified)
        {
            if (col == null)
                return;

            IDOUpdate objDO = new RHDOMnt.ProcPlaHora();
            IEnumerable<EProcPlaHora> colSel = null;

            if (filterModified)
            {
                var deleteItems = from itm in col
                                  where itm.EntityState == EntityState.Deleted
                                  select itm;

                colSel = (IEnumerable<EProcPlaHora>)deleteItems;
            }
            else
            {
                var deleteItems = from itm in col
                                  select itm;

                colSel = (IEnumerable<EProcPlaHora>)deleteItems;
            }
            foreach (EProcPlaHora objE in colSel)
                objDO.Delete(objE);
        }