private void DeleteMaster(ETablaGenDet entity)
        {
            IDOUpdate objDO = new MGDOMnt.TablaGenDet();

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

             objDO.Delete(entity);
        }
        private object[] UpdateMaster(ETablaGenDet entity)
        {
            IDOUpdate objDO = new MGDOMnt.TablaGenDet();

             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(ETablaGenDet value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidTabla", SqlDbType.Char, 3, value.IdTabla));
             arrPrm.Add(DataHelper.CreateParameter("@pidCodigo", SqlDbType.Char, 3, value.IdCodigo));

             return arrPrm;
        }