public void LoadData() { SqlConnection _sqlConnection = ConnectionHandler.GetConnection(); SqlCommand _sqlCommand = new SqlCommand(); _sqlCommand.CommandType = CommandType.Text; _sqlCommand.Connection = _sqlConnection; _sqlCommand.CommandText = "select * from Medicare_services"; SqlDataAdapter _sqlDataAdapter = new SqlDataAdapter(_sqlCommand); DataTable _dataTable = new DataTable(); _sqlDataAdapter.Fill(_dataTable); MserviceDetails.DataSource = _dataTable; MserviceDetails.DataBind(); }
public void GetMedicareServices() { BALAccounts Bal = new BALAccounts(); List <MedicareServices> medicareservices = Bal.displaymedicareservices(); MserviceDetails.DataSource = medicareservices; MserviceDetails.DataBind(); if (medicareservices.Count == 0) { lblStatus.Text = "Services not available"; } else { headStatusservices.Text = "Medicare Services"; } }