private void UpdateDetailH(EPerHistoAprob entity, object[] primKey) { if (entity == null) return; IDOUpdate objDO = new RHDOMnt.PerHistoAprob(); if (entity.EntityState == EntityState.Unchanged) return; object[] objRet = null; if (primKey != null) { entity.IdPersonal = primKey[0].ToString(); } switch (entity.EntityState) { case EntityState.Added: objRet = objDO.Insert(entity); break; case EntityState.Modified: objDO.Update(entity); break; case EntityState.Deleted: objDO.Delete(entity); break; } }
private ArrayList BuildParamInterface(EPerHistoAprob value) { ArrayList arrPrm = new ArrayList(); arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, value.IdEmpresa)); arrPrm.Add(DataHelper.CreateParameter("@pidPersonal", SqlDbType.Char, 7, value.IdPersonal)); arrPrm.Add(DataHelper.CreateParameter("@pnuSecuen", SqlDbType.SmallInt, value.NuSecuen)); arrPrm.Add(DataHelper.CreateParameter("@pidEstado", SqlDbType.Char, 3, value.IdEstado)); arrPrm.Add(DataHelper.CreateParameter("@pidUser", SqlDbType.Char, 5, value.IdUser)); arrPrm.Add(DataHelper.CreateParameter("@pfeAccion", SqlDbType.DateTime, value.FeAccion)); arrPrm.Add(DataHelper.CreateParameter("@pdsObservacion", SqlDbType.VarChar, 250, value.DsObservacion)); return arrPrm; }