private void ViewHistButton_Click(object sender, EventArgs e)
        {
            DataTable dt1 = controllerObj.ViewPatientHistory((int)_pid, (string)TypeComboBox.SelectedValue);

            HistoryDataGridView.DataSource = dt1;
            HistoryDataGridView.Refresh();
        }
Beispiel #2
0
        private void GetHistory()
        {
            string SQL = "SELECT BeforeBalance as [Before], [Transfer], Amount, NewBalance as New, CONVERT(date, ExecutionTime) as [Date], Memo, CASE Cash WHEN 1 THEN 'Y' ELSE 'N' END AS Cash FROM SavingsEventLog ORDER BY ExecutionTime DESC";

            cmd = new SqlCommand(SQL, con);
            con.Open();
            DataTable      table = new DataTable();
            SqlDataAdapter da    = new SqlDataAdapter(cmd);

            da.Fill(table);
            HistoryDataGridView.DataSource = table;
            HistoryDataGridView.AutoResizeColumns();
            con.Close();
        }