using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using sql;


public partial class CaseDetails : System.Web.UI.Page
{
    SqlDB sqldb = new SqlDB();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind();
        }
    }
    private string  getCaseId()
    {
        string Id="";
        if (Request.QueryString["id"] != null)
        {
            Id = Request.QueryString["id"].ToString();
            return Id;
        }
        else
        {
            Response.Redirect("err.aspx");
        }
        return Id;
    }
    private void Bind()
    {
       string strSql="select * from [case] where caseId="+ getCaseId();
       DataSet ds=sqldb.GetDS(strSql);
       lblcaseName.Text =ds.Tables[0].Rows[0]["caseName"].ToString();
       lblcaseDescribe.Text = ds.Tables[0].Rows[0]["caseDescribe"].ToString();
       lblcaseUrl.Text = ds.Tables[0].Rows[0]["caseUrl"].ToString();
       lblimg.ImageUrl ="images/case/images/"+ ds.Tables[0].Rows[0]["bigImage"].ToString();
       lblcaseMade.Text = ds.Tables[0].Rows[0]["caseMade"].ToString();
       lblcaseBelong.Text = ds.Tables[0].Rows[0]["caseBelong"].ToString();
       ds.Clear();
    }
}
