Exemplo n.º 1
0
        public ActionResult AddTO()
        {
            var _TOs = new SelectList(_TOService.GetList(), "Id", "TOName");

            ViewBag.TOs = _TOs;
            return(View());
        }
Exemplo n.º 2
0
 private void LoadData()
 {
     try
     {
         List <TOViewModel> list = _TO.GetList();
         if (list != null)
         {
             dataGridView.DataSource              = list;
             dataGridView.Columns[0].Visible      = false;
             dataGridView.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }
Exemplo n.º 3
0
 // GET: TOs
 public ActionResult Index()
 {
     return(View(Service.GetList()));
 }