protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); String bg = Request.QueryString["grp"]; String dist = Request.QueryString["dist"]; String sql = "select DonorName,Sex,Age,Phone,Mobile,District from BloodDonation where BloodGroup='" + bg + "'"; if (dist != "any") { sql += " and District='" + dist + "'"; } ds.Clear(); ds = dbe.getData(sql); if (ds.Tables[0].Rows.Count == 0) { lblMsg.Text = "No results found"; } else { gvResults.DataSource = ds.Tables[0]; gvResults.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); String sql = "select Name,Email,Description from ConsultInfo where CDate='" + DateTime.Now.ToShortDateString() + "'"; ds = dbe.getData(sql); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); }
public DataViewerViewModel() { base.DisplayName = Resources.MainWindowViewModel_Command_DB_Browser; this.FilterCommand = new RelayCommand(this.OnFilter, this.CanFilter); this.ClearFilterCommand = new RelayCommand(this.OnClearFilter, this.CanClearFilter); this.RefreshCommand = new RelayCommand(this.OnRefresh, this.CanRefresh); DatabaseList = DBExplorer.GetDBList(); RowCount = "1000"; }
protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); if (!IsPostBack) { for (int i = 18; i <= 60; i++) { ddlAge.Items.Add(i.ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { ddlSpec.Attributes.Add("onchange", "getHospNames(this.value)"); dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); if (!IsPostBack) { ddlSpec.Items.Add("--Select--"); DataSet ds = dbe.getData("select Distinct Specialization from Hosp_DoctorsList"); foreach (DataRow dr in ds.Tables[0].Rows) { ddlSpec.Items.Add(dr["Specialization"].ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); ddlSpec.Attributes.Add("onchange", "getDocNames(this.value)"); //ddlDocList.Attributes.Add("onchange", "getInfo(this.value)"); btnSave.Attributes.Add("onclick", "validateForm()"); if (!IsPostBack) { ddlSpec.Items.Add("--Select--"); DataSet ds = dbe.getData("select Distinct specialization from doc_reg"); foreach (DataRow dr in ds.Tables[0].Rows) { ddlSpec.Items.Add(dr["specialization"].ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["userid"] == null) { Response.Redirect("index.aspx"); } dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); if (!IsPostBack) { String duserid = Session["userid"].ToString(); ds = dbe.getData("select ID from doc_reg where Username='******'"); String id = ds.Tables[0].Rows[0][0].ToString(); string sql = "select ClientName,Age,Sex,Address,City,State,CONVERT(CHAR(11), AppDate, 106) as AppDate from Doc_AppInfo where DoctorID=" + id; ds.Clear(); ds = dbe.getData(sql); gvTPL.DataSource = ds.Tables[0]; gvTPL.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["userid"] == null) { Response.Redirect("index.aspx"); } dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); if (!IsPostBack) { String huserid = Session["userid"].ToString(); ds = dbe.getData("select ID from hosp_reg where Username='******'"); String hid = ds.Tables[0].Rows.ToString(); String sql = "select DoctorName,Age,DOB,Sex,Qualification,Specialization,MStatus from Hosp_DoctorsList where HospitalID=" + hid; ds.Clear(); ds = dbe.getData(sql); gvDocList.DataSource = ds.Tables[0]; gvDocList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["userid"] == null) { Response.Redirect("index.aspx"); } dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); if (!IsPostBack) { String huserid = Session["userid"].ToString(); ds = dbe.getData("select ID from hosp_reg where Username='******'"); String id = ds.Tables[0].Rows[1][1].ToString(); string sql = "SELECT ClientName, Age, Sex, Address, City, State, " + "(SELECT DoctorName FROM Hosp_DoctorsList AS B WHERE (ID = A.DoctorName)) AS DoctorName," + "CONVERT(CHAR(11), AppDate, 106) AS AppDate FROM Hosp_Appnfo AS A WHERE (HospitalID = " + id + ")"; ds.Clear(); ds = dbe.getData(sql); gvTPL.DataSource = ds.Tables[0]; gvTPL.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); ds = new DataSet(); string sql = "SELECT Provider,Address,Phone,Mobile,City,District from AmbulanceService "; if (Request.QueryString["id"] != "any") { sql += " where District='" + Request.QueryString["id"] + "'"; } ds.Clear(); ds = dbe.getData(sql); if (ds.Tables[0].Rows.Count == 0) { lblmsg.Text = "No results found"; return; } GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { dbe = new DBExplorer(ConfigurationManager.ConnectionStrings["Fedora"].ConnectionString); dbe.OpenConnection(); }
private void FetchTableDetails() { ColumnList = DBExplorer.GetSchema(Database, "Columns", TableName); IndexList = DBExplorer.GetSchema(Database, "Indexes", TableName); DataList = DBExplorer.GetTableData(Database, TableName, long.Parse(RowCount)); }