示例#1
0
        private void FillList()
        {
            VehicleList objList = new VehicleList();

            objList = VehicleManager.GetList("", chkIsActive.Checked);

            lvwVehicles.Items.Clear();

            if (objList != null)
            {
                foreach (Vehicle objVehicle in objList)
                {
                    ListViewItem objLvwItem = new ListViewItem();
                    objLvwItem.Name = Convert.ToString(objVehicle.Dbid);
                    objLvwItem.Text = Convert.ToString(objVehicle.VehicleNo);
                    if (objVehicle.PUCExpiry != DateTime.MinValue)
                    {
                        objLvwItem.SubItems.Add(objVehicle.PUCExpiry.ToShortDateString());
                    }
                    else
                    {
                        objLvwItem.SubItems.Add("");
                    }

                    lvwVehicles.Items.Add(objLvwItem);
                }
            }
        }
示例#2
0
        // GET: Vehicle
        public IActionResult Index()
        {
            var vehicles = VehicleManager.GetList();

            return(View(vehicles));
        }