private object[] UpdateMaster(EBienFiscaEstable entity)
        {
            IDOUpdate objDO = new CODOMnt.BienFiscaEstable();

            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 UpdateDetail(IList<EBienFiscaEstable> col, object[] primKey)
        {
            if (col == null)
                return;

            IDOUpdate objDO = new CODOMnt.BienFiscaEstable();

            foreach (EBienFiscaEstable objE in col)
            {

                object[] objRet = null;

                if (primKey != null)
                {
                }

                switch (objE.EntityState)
                {

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

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

                }

            }
        }