public void setData(int transid, SQLConnector scon)
        {
            sCon = scon;
            dS = new DataSet();
            TransID = transid;
            if (transid >= 0)
            {
                lb_id.Text = "Trans-ID: " + transid;
            }

            //load DataSets
            sDA_offers = sCon.getOffers_List(dS, null);
            sDA_sellers = sCon.getSellers_List_FullName(dS, null);
            sDA_transaction = sCon.getTransaction(dS, "transaction", null, TransID);

            //set Data to Form-Elements
            lBox_offer.DataSource = dS.Tables["offers"];
            lBox_offer.DisplayMember = "OfferName";
            lBox_offer.ValueMember = "OfferID";
            lBox_seller.DataSource = dS.Tables["sellers"];
            lBox_seller.DisplayMember = "SellerName";
            lBox_seller.ValueMember = "SellerID";
            if (dS.Tables["transaction"].Rows.Count > 0)
            {
                lb_id.Text = "Trans-ID: " + dS.Tables["transaction"].Rows[0]["ID"];
                lBox_offer.SelectedValue = dS.Tables["transaction"].Rows[0]["offerID"];
                lBox_seller.SelectedValue = dS.Tables["transaction"].Rows[0]["sellerID"];
                nTB_contingent.Text = ((int)dS.Tables["transaction"].Rows[0]["seller_contingent"]).ToString();
            }
        }
        public void setData(int passengerid, int sellerID, SQLConnector scon)
        {
            sCon = scon;
            dS = new DataSet();
            PassengerID = passengerid;
            if (passengerid >= 0)
            {
                lb_id.Text = "Passenger-ID: " + passengerid;
            }

            //load DataSets
            sDA_sellers = sCon.getSellers_List_FullName(dS, null);
            sDA_customers = sCon.getCustomers_List_FullName(dS, null);

            sDA_passenger = sCon.getPassenger(dS, "passenger", null, PassengerID);

            //set Data to Form-Elements
            lBox_customer.DataSource = dS.Tables["customers"];
            lBox_customer.DisplayMember = "CustomerName";
            lBox_customer.ValueMember = "CustomerID";

            coB_select_seller.DataSource = dS.Tables["sellers"];
            coB_select_seller.DisplayMember = "SellerName";
            coB_select_seller.ValueMember = "SellerID";

            if (sellerID >= 0)  coB_select_seller.SelectedValue = sellerID;

            if (dS.Tables["passenger"].Rows.Count > 0)
            {
                if (sellerID < 0)
                {
                    sDA_passenger_seller = sCon.getPassenger_Seller(dS, "passenger_seller", null, PassengerID);
                    if (dS.Tables["passenger_seller"].Rows.Count > 0)  coB_select_seller.SelectedValue = dS.Tables["passenger_seller"].Rows[0]["sellerID"];
                }

                lb_id.Text = "Passenger-ID: " + dS.Tables["passenger"].Rows[0]["ID"];
                lBox_customer.SelectedValue = dS.Tables["passenger"].Rows[0]["customerID"];
                lBox_transaction.SelectedValue = dS.Tables["passenger"].Rows[0]["transactionID"];
                nTB_price.Text = ((decimal)dS.Tables["passenger"].Rows[0]["price"]).ToString();
                //if ((byte)dS.Tables["passenger"].Rows[0]["is_paid"] == 0) cB_is_paid.Checked = false; else cB_is_paid.Checked = true;
                cB_is_paid.Checked = Convert.ToBoolean((byte)dS.Tables["passenger"].Rows[0]["is_paid"]);
                dTP_booked_date.Value = (DateTime)dS.Tables["passenger"].Rows[0]["booked_time"];
                dTP_booked_time.Value = (DateTime)dS.Tables["passenger"].Rows[0]["booked_time"];
            }
        }