private void btOk_Click(object sender, RoutedEventArgs e) { /// //Item seleccionado Transporters transSelected = (Transporters)cbTransport.SelectedItem; // if (transSelected != null) { /// if (!String.IsNullOrEmpty(txtGuide.Text)) { /// _transGuidesVM = new Transporters_GuidesViewModel(); /// String newIdGuide = ""; Liquidacion.insertar_guia(txtGuide.Text, Convert.ToInt32(transSelected._trv_transporters_id), _noLiq, out newIdGuide); /// if (!newIdGuide.Equals("-1") && !newIdGuide.Equals("1")) { //_liqHdrVM = new Liquidation_HdrViewModel(); ///// Actualizar el numero de guia en la liquidacion /// //String resp = _liqHdrVM.updateGuideLiquidation( _noLiq, newIdGuide); ///// //if (!resp.Equals("-1")) // All process is successfully DialogResult = true; this.Close(); } else { txtInfoSave.Foreground = Brushes.Red; /// txtInfoSave.Text = "Es probable que la guia ya exista, por favor dígite un nuevo numero de guia."; } } else { txtInfoSave.Foreground = Brushes.Red; /// txtInfoSave.Text = "Por favor dígite el numero de guia."; } } else { txtInfoSave.Foreground = Brushes.Red; /// txtInfoSave.Text = "Por favor, seleccione la transportadora."; } }
/// <summary> /// Inicializacion de todos los objetos necesarios para el funcionamiento correcto del formulario /// </summary> public void startObjects() { _LiquHdVM = new Liquidation_HdrViewModel(); /// _CoordinatorVM = new CoordinatorViewModel(); /// _TransGuidesVM = new Transporters_GuidesViewModel(); /// _packagesVM = new PackagesViewModel(); /// _packDtlVM = new Packages_DtlViewModel(); /// _ocPackDtl = new ObservableCollection <Packages_Dtl>(); /// _CustomerType = ""; /// //objGenerarTicket = new GenerarTicket(); /// ///GridLiqInfo.DataContext = _LiquHdVM.getLiquidationHdr(_co, "25085"); /// }