/// <summary>Método que representa la llamada lógica de 'Actualizar'</summary> public virtual ReturnValue Actualizar(List <CentroCosto_Lin> oListar) { var oCursor = new Data.Cursor(true); //True: Para realizarlo con transaccion. RetValue.Send(false); try { Data.CentroCosto_Cab.Actualizar(this, oCursor); var oCentroCosto_Lin = new CentroCosto_Lin(ccosto, null); Data.CentroCosto_Lin.Eliminar(oCentroCosto_Lin, oCursor); for (int i = 0; i <= oListar.Count - 1; i++) { //Aqui le pasamos los valores de la llave de la cabecera al detalle oListar[i].ccosto = this.ccosto; Data.CentroCosto_Lin.Insertar(oListar[i], oCursor); } return(RetValue.Send(true)); } catch (System.Exception) { throw; } finally { oCursor.Finalizar(RetValue.IsOk); } }
/// <summary>Método que representa la llamada lógica de 'Actualizar'</summary> public virtual ReturnValue Actualizar(List<CentroCosto_Lin> oListar) { var oCursor = new Data.Cursor(true); //True: Para realizarlo con transaccion. RetValue.Send(false); try { Data.CentroCosto_Cab.Actualizar(this, oCursor); var oCentroCosto_Lin = new CentroCosto_Lin(ccosto, null); Data.CentroCosto_Lin.Eliminar(oCentroCosto_Lin, oCursor); for (int i = 0; i <= oListar.Count - 1; i++) { //Aqui le pasamos los valores de la llave de la cabecera al detalle oListar[i].ccosto = this.ccosto; Data.CentroCosto_Lin.Insertar(oListar[i], oCursor); } return RetValue.Send(true); } catch (System.Exception) { throw; } finally { oCursor.Finalizar(RetValue.IsOk); } }
private void CargarPartida(string ccosto) { //mostrar solo las partidas del centro de costo var oCentroCosto_Lin = new CentroCosto_Lin(); oCentroCosto_Lin.ccosto = ccosto; var LoPartidaListarDes = oCentroCosto_Lin.Listar(); LoPartidaListarDes.Insert(0, new CentroCosto_Lin.Listar { idPartida = "", partida = "-Seleccionar-" }); Win.CargarCombo(cboPartidas, LoPartidaListarDes); }