private object[] UpdateMaster(EFeriado entity) { IDOUpdate objDO = new MGDOMnt.Feriado(); 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(EFeriado value) { ArrayList arrPrm = new ArrayList(); arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, value.IdPeriodo)); arrPrm.Add(DataHelper.CreateParameter("@pfeFeriado", SqlDbType.DateTime, value.FeFeriado)); return arrPrm; }
private void DeleteMaster(EFeriado entity) { IDOUpdate objDO = new MGDOMnt.Feriado(); if (entity.EntityState == EntityState.Unchanged) return; objDO.Delete(entity); }