private void LoadData()
        {
            var list = _logicH.Read(null);

            if (list != null)
            {
                dataGridView.DataSource              = list;
                dataGridView.Columns[0].Visible      = false;
                dataGridView.Columns[3].Visible      = false;
                dataGridView.Columns[4].Visible      = false;
                dataGridView.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            }
        }
예제 #2
0
 private void FormHotel_Load(object sender, EventArgs e)
 {
     if (Id.HasValue)
     {
         var model = _logicH.Read(new HotelBindingModel {
             Id = Id
         })?[0];
         if (model == null)
         {
             return;
         }
         textBoxCity.Text      = model.City.ToString();
         textBoxHotelName.Text = model.Hotelname.ToString();
     }
 }