示例#1
0
 public FrmVechileDetail()
 {
     reciever = new VehicleReciever();
     helper   = new DataHelper();
     InitializeComponent();
     Configuration();
     RefreshList();
 }
示例#2
0
        private void FrmSalesTransport_Load(object sender, EventArgs e)
        {
            vehicleReciever   = new VehicleReciever();
            transportReciever = new TransportationReciever();
            helper            = new Helpers.DataHelper();

            // Fill transportation list
            helper.FillCombo(cmbTransport, GetTransports());
            FillVehicleList();
            if (_model != null)
            {
                cmbTransport.SelectedIndex = GetTransports().Select((obj, index) => new { obj, index }).Where(x => x.obj.Value == _model.TransportationID.ToString()).Select(x => x.index).FirstOrDefault();
                if (_model.TVehicleNumberID > 0)
                {
                    cmbVehicleNumber.SelectedIndex = GetVehicles().Select((obj, index) => new { obj, index }).Where(x => x.obj.Value == _model.TVehicleNumberID.ToString()).Select(x => x.index).FirstOrDefault();
                }
                txtDriverName.Text      = _model.TEmployeeName;
                txtDriverMobNumber.Text = _model.TEmployeeMobNumber;
            }
        }
示例#3
0
 public FrmAddEditVechile(VehicleModel model)
 {
     reciever = new VehicleReciever();
     _model   = model;
     InitializeComponent();
 }
示例#4
0
 public FrmAddEditVechile()
 {
     reciever = new VehicleReciever();
     InitializeComponent();
 }