diff --git a/.idea/config/applicationhost.config b/.idea/config/applicationhost.config
index 6aca535..976a66d 100644
--- a/.idea/config/applicationhost.config
+++ b/.idea/config/applicationhost.config
@@ -155,7 +155,7 @@
-
+
diff --git a/FWA_MAIN/MediSearch.aspx b/FWA_MAIN/MediSearch.aspx
index 11d9971..74afe15 100644
--- a/FWA_MAIN/MediSearch.aspx
+++ b/FWA_MAIN/MediSearch.aspx
@@ -2,26 +2,21 @@
-
+
-
+
-
+
Medications
@@ -61,15 +56,23 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/FWA_MAIN/MediSearch.aspx.cs b/FWA_MAIN/MediSearch.aspx.cs
index dce0cf9..674758d 100644
--- a/FWA_MAIN/MediSearch.aspx.cs
+++ b/FWA_MAIN/MediSearch.aspx.cs
@@ -1,4 +1,5 @@
using System;
+using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -8,20 +9,120 @@ namespace FWA_MAIN
{
protected void Page_Load(object sender, EventArgs e)
{
+ if (!IsPostBack)
+ {
+
+ txtMedID.Text = Convert.ToString(Session["vMedID"]);
+ txtMedName.Text = Convert.ToString(Session["vMedName"]);
+ txtRxNum.Text = Convert.ToString(Session["vRxNum"]);
+
+ btnMediSearch_OnClick(sender,e);
+ }
}
+
+ private void BindData()
+ {
+
+ DataSet ds = new DataSet();
+
+ string medID = Convert.ToString(Session["vMedID"]);
+ string medicationname = Convert.ToString(Session["vMedName"]);
+ //string RxNum = Convert.ToString(Session["vRxNum"]);
+
+ txtMedID.Text = medID;
+ txtMedName.Text = medicationname;
+ //txtRxNum.Text = RxNum;
+
+ // if (textHasValues)
+ // {
+ ds = PharmacyDataTier.MedicationInfoSearch(medID, medicationname);
+ // }
+
+
+ // ds = dt.GetStudents();
+ gvMedication.DataSource = ds.Tables[0];
+
+ if (Cache["StudentData"] == null)
+ {
+ Cache.Add("StudentData", new DataView(ds.Tables[0]),
+ null,System.Web.Caching.Cache.NoAbsoluteExpiration,
+ System.TimeSpan.FromMinutes(10), System.Web.Caching.CacheItemPriority.Default,
+ null);
+ }
+ gvMedication.DataBind();
+
+ }
+
+
protected void btnMediSearch_OnClick(object sender, EventArgs e)
{
- throw new NotImplementedException();
+ if (txtMedID.Text.Trim().Length > 0 || txtMedName.Text.Trim().Length > 0 || txtRxNum.Text.Trim().Length > 0)
+ {
+
+
+ try
+ {
+
+ Session["vMedID"] = txtMedID.Text.Trim();
+ Session["vMedName"] = txtMedName.Text.Trim();
+ Session["vRxNum"] = txtRxNum.Text.Trim();
+
+ Cache.Remove("StudentData");
+ BindData();
+
+
+
+ }
+ catch (Exception exception)
+ {
+
+
+
+ }
+
+ }
}
- protected void gvMedication_OnSelectedIndexChanged(object sender, EventArgs e)
- {
- throw new NotImplementedException();
- }
+
protected void gvMedication_OnRowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(gvMedication, "Select$" + e.Row.RowIndex);
+ e.Row.ToolTip = "Click to select this row.";
+ }
+ }
+
+
+
+ protected void gvMedication_OnRowCommand(object sender, GridViewCommandEventArgs e)
+ {
+ if (e.CommandName == "Select")
+ {
+ // Determine the index of the selected row
+ int index = Convert.ToInt32(e.CommandArgument);
+
+ // Check if the selected row index is the same as the previous selected row index
+ if (gvMedication.SelectedIndex == index)
+ {
+ // Deselect the row
+ gvMedication.SelectedIndex = -1;
+ }
+ else
+ {
+ // Select the row
+ gvMedication.SelectedIndex = index;
+ }
+
+ // Refresh the GridView to update the style
+ gvMedication.DataBind();
+ }
+ }
+
+ protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
throw new NotImplementedException();
}
diff --git a/FWA_MAIN/bin/FWA_MAIN.dll b/FWA_MAIN/bin/FWA_MAIN.dll
index 757f26c..c6c1e33 100644
Binary files a/FWA_MAIN/bin/FWA_MAIN.dll and b/FWA_MAIN/bin/FWA_MAIN.dll differ
diff --git a/FWA_MAIN/bin/FWA_MAIN.pdb b/FWA_MAIN/bin/FWA_MAIN.pdb
index 608474c..0f28b78 100644
Binary files a/FWA_MAIN/bin/FWA_MAIN.pdb and b/FWA_MAIN/bin/FWA_MAIN.pdb differ
diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.AssemblyReference.cache b/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.AssemblyReference.cache
index c4fc5be..0b111af 100644
Binary files a/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.AssemblyReference.cache and b/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.AssemblyReference.cache differ
diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.CoreCompileInputs.cache b/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.CoreCompileInputs.cache
index a464a6c..b454eea 100644
--- a/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.CoreCompileInputs.cache
+++ b/FWA_MAIN/obj/Debug/FWA_MAIN.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-8e9911070208912cc09443f3ed39db28706d92c028ebb520b053693deaaf19ef
+5c5d3543aa3df97a4bf6915d78123652c5cfa939186f89192a82bb6d5f3ed9b9
diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.dll b/FWA_MAIN/obj/Debug/FWA_MAIN.dll
index 757f26c..c6c1e33 100644
Binary files a/FWA_MAIN/obj/Debug/FWA_MAIN.dll and b/FWA_MAIN/obj/Debug/FWA_MAIN.dll differ
diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.pdb b/FWA_MAIN/obj/Debug/FWA_MAIN.pdb
index 608474c..0f28b78 100644
Binary files a/FWA_MAIN/obj/Debug/FWA_MAIN.pdb and b/FWA_MAIN/obj/Debug/FWA_MAIN.pdb differ