Exemple #1
0
 private void frmParkingUsedSlot_Load(object sender, EventArgs e)
 {
     JoinAccountInfo[] receipt = connect.searchReceiptRefence_pending_specific(barcode).ToArray();
     txtTimeIn.Text         = receipt[0].refTimeIn;
     txtCustomer.Text       = receipt[0].vehicleOwner;
     txtParkingBlock.Text   = receipt[0].slotBlock;
     txtParkingNo.Text      = receipt[0].slotNumber;
     txtRatePerHour.Text    = receipt[0].typeRatePerHour;
     txtVehicleColor.Text   = receipt[0].vehicleColor;
     txtVehiclePlateNo.Text = receipt[0].vehiclePlateNo;
     txtVehicleType.Text    = receipt[0].typeName;
     cboVehicleBrand.Text   = receipt[0].brandName;
 }
Exemple #2
0
        private void frmPayment_Load(object sender, EventArgs e)
        {
            JoinAccountInfo[] receipt = connect.searchReceiptRefence_pending_specific(selectedBarcode).ToArray();
            selectedID             = receipt[0].refID;
            txtTimeIn.Text         = receipt[0].refTimeIn;
            txtCustomer.Text       = receipt[0].vehicleOwner;
            txtParkingBlock.Text   = receipt[0].slotBlock;
            txtParkingNo.Text      = receipt[0].slotNumber;
            txtRatePerHour.Text    = receipt[0].typeRatePerHour;
            txtVehicleColor.Text   = receipt[0].vehicleColor;
            txtVehiclePlateNo.Text = receipt[0].vehiclePlateNo;
            txtVehicleType.Text    = receipt[0].typeName;
            cboVehicleBrand.Text   = receipt[0].brandName;
            txtTimeOut.Text        = DateTime.Now.ToString();

            DateTime timeIn  = DateTime.Parse(txtTimeIn.Text);
            DateTime timeOut = DateTime.Parse(txtTimeOut.Text);

            Double timeCount = Math.Round(timeOut.Subtract(timeIn).TotalHours, 2);

            lblTimeCount.Text = timeCount.ToString();
            lblAmount.Text    = (Double.Parse(txtRatePerHour.Text) * timeCount).ToString();
        }