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>");
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                var token = Session["TOKEN"] as string;
                var user  = TokenManager.Identifytoken(token);
                if (user != null)
                {
                    var context = new MOMEntities();
                    //this.BindGrid();  var context = new MOMEntities();
                    var list  = context.DEPARTMENTTABLE.ToList();
                    var list1 = context.ROLETABLE.ToList();
                    Rolelist.DataSource     = list1;
                    Rolelist.DataTextField  = "ROLE";
                    Rolelist.DataValueField = "ROLEID";
                    Rolelist.DataBind();

                    DepList.DataSource     = list;
                    DepList.DataTextField  = "DEPARTMENT";
                    DepList.DataValueField = "KEY";
                    DepList.DataBind();
                }
                else
                {
                    Response.Redirect("Login.aspx");
                }
            }
        }
        void prepareDepartment()
        {
            string sqlstr = "select dep_id, dep_name from department order by dep_id";

            depSet             = mydb.GetDataTable(sqlstr);
            DepList.DataSource = depSet;
            DepList.DataBind();
        }
Exemple #4
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>");
        }