74 lines
1.9 KiB
C#
74 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
using Microsoft.VisualBasic;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Data.SqlClient;
|
|
|
|
namespace Louis__Pharmacy_CNSA212_FP
|
|
{
|
|
public partial class frmRefill : Form
|
|
{
|
|
public frmRefill()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void rEFILLSBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void frmRefill_Load(object sender, EventArgs e)
|
|
{
|
|
dgvRefills.Visible = false;
|
|
}
|
|
|
|
private void btnSearch_Click(object sender, EventArgs e)
|
|
{
|
|
string patientID = "";
|
|
DateTime date = new DateTime();
|
|
|
|
try
|
|
{
|
|
DataSet ds = new DataSet();
|
|
//PharmacyDataTier phaDT = new PharmacyDataTier();
|
|
|
|
patientID = txtPatientID.Text.Trim();
|
|
if (txtDate.Text.Trim().Length > 0)
|
|
{
|
|
date = DateTime.Parse(txtDate.Text.Trim());
|
|
}
|
|
|
|
ds = PharmacyDataTier.RefillSearch(date, patientID);
|
|
|
|
if (ds.Tables[0].Rows.Count > 0 )
|
|
{
|
|
dgvRefills.Visible = true;
|
|
|
|
dgvRefills.DataSource = ds.Tables[0];
|
|
dgvRefills.AlternatingRowsDefaultCellStyle.BackColor = Color.Black;
|
|
dgvRefills.AlternatingRowsDefaultCellStyle.ForeColor = Color.White;
|
|
}
|
|
else
|
|
{
|
|
dgvRefills.Visible = false;
|
|
MessageBox.Show("No records found");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|