-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPatientViewMedicalSchemeApplyDetails.aspx.cs
More file actions
59 lines (54 loc) · 1.72 KB
/
PatientViewMedicalSchemeApplyDetails.aspx.cs
File metadata and controls
59 lines (54 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public partial class PatientViewMedicalSchemeApplyDetails : System.Web.UI.Page
{
SqlConnection con;
SqlCommand cmd;
SqlDataReader rs;
SqlDataAdapter adp;
DataTable dt;
void bindview()
{
adp = new SqlDataAdapter("select m1.policyno, m1.padate,m2.iid, m2.cname,m2.mischeme,m2.ipamount, m2.vperiod,m2.idisease, m2 .mcamount from msatable m1, mstable m2 where m1.cid=@cid and m1.rid=m2.rid", con);
adp.SelectCommand.Parameters.AddWithValue("cid", TextBox1.Text);
dt = new DataTable();
adp.Fill(dt);
DetailsView1.DataSource = dt;
DetailsView1.DataBind();
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
Label1 .Text ="";
Menu m5 = (Menu)Master.FindControl("Menu5");
m5.Visible = true;
con = new SqlConnection(ConfigurationManager.ConnectionStrings["connection"].ConnectionString);
con.Open();
if (!IsPostBack)
{
if (Session["PID"] != null)
{
TextBox1.Text = Session["PID"].ToString();
bindview();
}
}
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
{
DetailsView1.PageIndex = e.NewPageIndex;
bindview();
}
}