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; }
private void DeleteMaster(EHora entity) { IDOUpdate objDO = new RHDOMnt.Hora(); if (entity.EntityState == EntityState.Unchanged) return; objDO.Delete(entity); }
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; }
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; }