/// <summary> /// Crea un nuevo elemento /// </summary> /// <param name="entity">Entidad con datos</param> public MotivoCancelacion Create(MotivoCancelacion entity) { var result = _repository.Create(entity); _repository.Save(); return(result); }
public override List <MotivoCancelacion> ObtenerMotivosCancelacion() { factory = DbProviderFactories.GetFactory(App.ProviderName); List <MotivoCancelacion> lista = new List <MotivoCancelacion>(); using (DbConnection _connection = factory.CreateConnection()) { _connection.ConnectionString = App.ConnectionString; _connection.Open(); DbDataReader reader; try { DbCommand cmd = _connection.CreateCommand(); cmd.CommandText = "spMGObtienelistaMCancelacion"; cmd.CommandType = CommandType.StoredProcedure; reader = cmd.ExecuteReader(); while (reader.Read()) { MotivoCancelacion motivo = new MotivoCancelacion(); motivo.IdCodigodeEntrega = Convert.ToInt32(reader["idcodigodeentrega"]); motivo.Descripcion = reader["descripcion"].ToString(); lista.Add(motivo); } } catch (Exception ex) { throw ex; } reader.Close(); } return(lista); }
/// <summary> /// Elimina un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Delete(MotivoCancelacion entity) { _service.Delete(entity); }
/// <summary> /// Actualiza un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Update(MotivoCancelacion entity) { _service.Update(entity); }
public int DeleteMotivoCancelacion(String BaseRemoteIp, int BaseIdUser, int?Clv_MOTCAN) { return(MotivoCancelacion.Delete(Clv_MOTCAN)); }
public int UpdateMotivoCancelacion(MotivoCancelacionEntity objMotivoCancelacion) { return(MotivoCancelacion.Edit(objMotivoCancelacion)); }
public int AddMotivoCancelacion(MotivoCancelacionEntity objMotivoCancelacion) { return(MotivoCancelacion.Add(objMotivoCancelacion)); }
public SoftvList <MotivoCancelacionEntity> GetMotivoCancelacionPagedListXml(int page, int pageSize, String xml) { return(MotivoCancelacion.GetPagedList(page, pageSize, xml)); }
/// <summary> /// Crea un nuevo elemento /// </summary> /// <param name="entity">Entidad con datos</param> public MotivoCancelacion Create(MotivoCancelacion entity) { return _context.Add(entity).Entity; }
public IEnumerable <MotivoCancelacionEntity> GetMotivoCancelacionList() { return(MotivoCancelacion.GetAll()); }
public MotivoCancelacionEntity GetDeepMotivoCancelacion(int?Clv_MOTCAN) { return(MotivoCancelacion.GetOneDeep(Clv_MOTCAN)); }
/// <summary> /// Elimina un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Delete(MotivoCancelacion entity) { _repository.Delete(entity); _repository.Save(); }
/// <summary> /// Actualiza un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Update(MotivoCancelacion entity) { _repository.Update(entity); _repository.Save(); }
/// <summary> /// Elimina un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Delete(MotivoCancelacion entity) { _context.Remove(entity); }
/// <summary> /// Crea un nuevo elemento /// </summary> /// <param name="entity">Entidad con datos</param> public MotivoCancelacion Create(MotivoCancelacion entity) { return(_service.Create(entity)); }
public SoftvList <MotivoCancelacionEntity> GetMotivoCancelacionPagedList(int page, int pageSize) { return(MotivoCancelacion.GetPagedList(page, pageSize)); }
/// <summary> /// Actualiza un elemento existente /// </summary> /// <param name="entity">Entidad con datos</param> public void Update(MotivoCancelacion entity) { _context.Update(entity); }