Exemplo n.º 1
0
        //protected int Tid;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _registation = (Registation)Session["User"];
                UserList     = _registationManager.GetUserDetail(_registation.UserId);
                foreach (var detail in UserList)
                {
                    ViewState["Tid"] = detail.Id;
                }


                classDropDownList.DataSource     = _dropDownManager.GetAllClasses();
                classDropDownList.DataTextField  = "ClassName";
                classDropDownList.DataValueField = "Id";
                classDropDownList.DataBind();

                districtDropDownList.DataSource     = _dropDownManager.GetAllDistrict();
                districtDropDownList.DataTextField  = "DistrictName";
                districtDropDownList.DataValueField = "Id";
                districtDropDownList.DataBind();



                bloodGroupDropDownList.DataSource     = _dropDownManager.GetAllBloodGroup();
                bloodGroupDropDownList.DataTextField  = "GroupName";
                bloodGroupDropDownList.DataValueField = "Id";
                bloodGroupDropDownList.DataBind();

                religionDropDownList.DataSource     = _dropDownManager.GetAllReligion();
                religionDropDownList.DataTextField  = "ReligionName";
                religionDropDownList.DataValueField = "Id";
                religionDropDownList.DataBind();


                ListItem classItem = new ListItem("Select Class", "-1");
                classDropDownList.Items.Insert(0, classItem);
                ListItem districtItem = new ListItem("Select District", "-1");
                districtDropDownList.Items.Insert(0, districtItem);
                ListItem upazilaItem = new ListItem("Select Upazila", "-1");
                upazilaDropDownList.Items.Insert(0, upazilaItem);
                ListItem bloodItem = new ListItem("Select Blood Group", "-1");
                bloodGroupDropDownList.Items.Insert(0, bloodItem);
                ListItem religionItem = new ListItem("Select Religion", "-1");
                religionDropDownList.Items.Insert(0, religionItem);
            }
        }