예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dc = new ClsDivisionChairs("MasterSchedule");

            if (Session["respondToParams"] != null)
            {
                if ((bool)Session["respondToParams"] == true)
                {
                    if (Session["facultyNumber"] != null)
                    {
                        txtIDNO.Text = Session["facultyNumber"].ToString();
                    }

                    if (Session["divisionSelected"] != null)
                    {
                        ddlDivision.SelectedIndex = int.Parse(Session["divisionSelected"].ToString());
                    }

                    Session["respondToParams"] = false;
                }
            }
        }
    public List <ClsDivisionChairs> FillList(DataSet ds)
    {
        List <ClsDivisionChairs> list = new List <ClsDivisionChairs>();

        foreach (DataRow row in ds.Tables[0].Rows)
        {
            ClsDivisionChairs objTemp = new ClsDivisionChairs(_connectionStringName);
            objTemp.DivisionChairsId = (int)row["DivisionChairsID"];
            if (row["CRPDivisionID"] != System.DBNull.Value)
            {
                objTemp.CrpDivisionId = (int)row["CRPDivisionID"];
            }
            if (row["IDNO"] != System.DBNull.Value)
            {
                objTemp.Idno = (int)row["IDNO"];
            }
            if (row["DivisionName"] != System.DBNull.Value)
            {
                objTemp.DivisionName = (string)row["DivisionName"];
            }
            list.Add(objTemp);
        }
        return(list);
    }