protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["Std_Id"] != null)
                {
                    Std_Id.Text = Request.QueryString["Std_Id"].ToString().Trim();
                }
                else
                {
                    Response.Redirect("~/Student");
                }

                prepareDepartment(); DepList.DataSource    = depSet; DepList.DataBind();
                prepareReligion(); ReligionList.DataSource = ReligionSet; ReligionList.DataBind();
                prepareClub(); ClubList.DataSource         = clubSet; ClubList.DataBind();



                Std_Id_Old.Value = Std_Id.Text;


                getDetail();
            }
            //for (int idx = 0; idx < mySet.Rows.Count; idx++)
            //      Response.Write(mySet.Rows[idx]["std_id"].ToString() + "-" + mySet.Rows[idx]["std_name"].ToString() + "<hr>");
        }
        void prepareClub()
        {
            string sqlstr = "select club_id, club_name from club order by club_id";

            ClubSet             = mydb.GetDataTable(sqlstr);
            ClubList.DataSource = ClubSet;
            ClubList.DataBind();
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                prepareDepartment();
                DepList.DataSource = depSet; DepList.DataBind();

                prepareReligion();
                ReligionList.DataSource = ReligionSet; ReligionList.DataBind();

                prepareClub();
                ClubList.DataSource = clubSet; ClubList.DataBind();
            }
            //for (int idx = 0; idx < mySet.Rows.Count; idx++)
            //      Response.Write(mySet.Rows[idx]["std_id"].ToString() + "-" + mySet.Rows[idx]["std_name"].ToString() + "<hr>");
        }
Ejemplo n.º 4
0
 private void BindClubList()
 {
     try
     {
         ClubController sysmgr = new ClubController();
         List <Clubs>   info   = sysmgr.Club_List();
         info.Sort((x, y) => x.ClubID.CompareTo(y.ClubID));
         ClubList.DataSource     = info;
         ClubList.DataTextField  = nameof(Clubs.ClubID);
         ClubList.DataValueField = nameof(Clubs.ClubID);
         ClubList.DataBind();
         ClubList.Items.Insert(0, "select....");
     }
     catch (Exception ex)
     {
         errormsgs.Add(GetInnerException(ex).ToString());
         LoadMessageDisplay(errormsgs, "alert alert-danger");
     }
 }