Ejemplo n.º 1
0
        private ArrayList BuildParamInterface(EHora value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, value.IdEmpresa));
             arrPrm.Add(DataHelper.CreateParameter("@pidHora", SqlDbType.Char, 3, DataHelper.IfNullString(value.IdHora)));

             return arrPrm;
        }
Ejemplo n.º 2
0
        private void DeleteMaster(EHora entity)
        {
            IDOUpdate objDO = new RHDOMnt.Hora();

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

             objDO.Delete(entity);
        }
Ejemplo n.º 3
0
        private object[] UpdateMaster(EHora entity)
        {
            IDOUpdate objDO = new RHDOMnt.Hora();

             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;
        }
Ejemplo n.º 4
0
        private ArrayList BuildParamInterface(EHora value)
        {
            ArrayList arrPrm = new ArrayList();

             arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, value.IdEmpresa));
             arrPrm.Add(DataHelper.CreateParameter("@pidHora", SqlDbType.Char, 3, value.IdHora));
             arrPrm.Add(DataHelper.CreateParameter("@pdsHora", SqlDbType.VarChar, 50, value.DsHora));
             arrPrm.Add(DataHelper.CreateParameter("@pdsAbrev", SqlDbType.VarChar, 25, value.DsAbrev));
             arrPrm.Add(DataHelper.CreateParameter("@pidVar", SqlDbType.VarChar, 15, value.IdVar));
             arrPrm.Add(DataHelper.CreateParameter("@pnuValHora", SqlDbType.Decimal, value.NuValHora));
             arrPrm.Add(DataHelper.CreateParameter("@pstEventual", SqlDbType.Char, 1, value.StEventual));
             arrPrm.Add(DataHelper.CreateParameter("@pnuOrden", SqlDbType.SmallInt, value.NuOrden));
             arrPrm.Add(DataHelper.CreateParameter("@pstImportar", SqlDbType.Char, 1, value.StImportar));
             arrPrm.Add(DataHelper.CreateParameter("@pstAnulado", SqlDbType.Char, 1, value.StAnulado));

             return arrPrm;
        }