testlinq1DataContext db = new testlinq1DataContext();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
show();
}
}
private void show()
{
var ace = from a in db.ITdevicedetails
join b in db.Brands
on a.Specid equals b.Specid
join c in db.Devicestatus
on a.Statusid equals c.Statusid
where a.Statusid == "ST03"
join d in db.Typedevices
on a.Type equals d.Type
select new
{
IDdevice = a.IDdevice,
Type = d.Type,
Brand = b.Brand1,
Spec = b.Spec
,
Model = b.Model,
Accode = a.Accode,
IPaddress = a.IPaddress,
Serialnumber = a.Serialnumber,
Status = c.Status,
Comment = a.Comment
};
GridView1.DataSource = ace.ToList();
GridView1.DataBind();
}