コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            decimal result;

            if (txtNroReserva.Enabled)
            {
                result = DAO.DAOFactory.PagoDAO.SetPagoAPasaje(
                    decimal.Parse(txtNroReserva.Text.Equals("") ? "0" : txtNroReserva.Text),
                    cbMedioPago.SelectedIndex + 1,
                    Int32.Parse(cbCantCuotas.Text),
                    decimal.Parse(lbPrecioTotal.Text)
                    );
            }
            else
            {
                _pago = new Model.Pago(Int32.Parse(cbCantCuotas.Text), Tools.GetDate(), _totalPasajes, _cliente, cbMedioPago.SelectedItem as Model.MedioPago);
                //result = DAO.DAOFactory.PagoDAO.GuardarPasajes(pasajes, _pago);
                result = DAO.DAOFactory.PagoDAO.CreateOrUpdate(_pago);
            }

            MessageBox.Show("Pago registrado. Código de Pago: " + result.ToString(), "", MessageBoxButtons.OK);
        }
コード例 #2
0
ファイル: BaseDAO.cs プロジェクト: miguel-selaez/GDD2019
 public string GetParam(Model.Pago param)
 {
     return(param != null && param.Id > 0 ? param.Id.ToString() : "null");;
 }