Esempio n. 1
0
        protected void btnOtherClasess_Click(object sender, EventArgs e)
        {
            lblstcode.Text = Session[sessionNames.userID_StudentOstad].ToString();
            LinkButton lnk       = sender as LinkButton;
            String     ClassCode = lnk.Attributes["CustomParameter"].ToString();

            if ((clsB.Show_similarClass_List(ClassCode, lblstcode.Text)).Count != 0)
            {
                string scrp = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                ScriptManager.RegisterStartupScript(this.Page, GetType(), ClientID, scrp, true);


                RadListView1.DataSource = clsB.Show_similarClass_List(ClassCode, lblstcode.Text);
                RadListView1.DataBind();
                foreach (RadListViewItem lvi in RadListView1.Items)
                {
                    RadListView lstAsset   = (RadListView)lvi.FindControl("radListView4");
                    Label       ClassCode1 = (Label)lvi.FindControl("ClassCode1");
                    var         classCode  = (ClassCode1.Text);
                    var         term       = ConfigurationManager.AppSettings["Term"].ToString();
                    lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode(classCode, term);
                    lstAsset.DataBind();
                    if (RadListView1.Items.Count > 0)
                    {
                        btn_Select.Visible = true;
                    }
                }
            }
            else
            {
                rwm_Validations.RadAlert("کلاس مشابه در این ترم وجود ندارد", null, 100, "پیام", "");
            }

            Session[sessionNames.userID_StudentOstad] = lblstcode.Text;
        }