using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class BackCenter_Lab_LabDetails : System.Web.UI.Page
{
    public DataRow dr;
    public string typeid;
    public string typebig;
    public string typesmall;
    protected void Page_Load(object sender, EventArgs e)
    {
        #region 过期和权限

        PageFunc.IfLogin(this.Page);

        #endregion
        //if (IsPostBack)
        //    return;
        if (Request["lid"] != null && Request["lid"].ToString() != "")
        {
            string sql = "select l.*,m.Account,m.Name,d.Title,d.Address  from NT_Lab l,NT_Member m,NT_Data d where l.MemberId=m.ID and l.DataId=d.ID and l.ID=" + Request["lid"].ToString();
            dr = DbHelperOleDb.ExecuteDataSet(CommandType.Text, sql, null).Tables[0].Rows[0];

            if (dr["Type"].ToString() == "5")
            {
                typeid = "5";
                typebig = "参观";
            }
            else
            {
                DataRow dr2 = DbHelperOleDb.ExecuteDataSet(CommandType.Text, "select l1.ID as IdBig,l2.ID as IdSmall, l1.TypeName as TypeBig,l2.TypeName as TypeSmall from NT_LabType l1,NT_LabType l2 where l1.ID=l2.ParentId and l2.ID=" + dr["Type"], null).Tables[0].Rows[0];
                typeid = dr2["IdBig"].ToString();
                typebig = dr2["TypeBig"].ToString();
                typesmall = dr2["TypeSmall"].ToString();

            }
        }
    }

}
