Exemplo n.º 1
0
 protected void rcbTerm_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
 {
     RadListView2.DataSource = clsB.Show_Class_List(Session[sessionNames.userID_StudentOstad].ToString(), rcbTerm.SelectedValue);
     RadListView2.DataBind();
     foreach (RadListViewItem lvi in RadListView2.Items)
     {
         RadListView lstAsset  = (RadListView)lvi.FindControl("RadListView3");
         Label       ClassCode = (Label)lvi.FindControl("ClassCode");
         lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode(ClassCode.Text, rcbTerm.SelectedValue);
         lstAsset.DataBind();
         if (RadListView2.Items.Count > 0)
         {
             btn_Select.Visible = true;
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dtbedehi = new DataTable();
                //double bedehi;
                //dtbedehi = GovahiBusiness.GetBedehkar(Session[sessionNames.userID_StudentOstad].ToString());
                //bedehi = Convert.ToDouble((dtbedehi.Rows[0]["bedehi"].ToString()));
                //DataTable dtReg = new DataTable();
                //dtReg = GovahiBusiness.GetStRegisterd(Session[sessionNames.userID_StudentOstad].ToString());
                //DataTable dtnaghs = new DataTable();
                ////dtnaghs = logBusiness.StHasNaghs(Session["user"].ToString());
                DataTable dt = new DataTable();
                dt = logBusiness.GetStIdVaz(Session[sessionNames.userID_StudentOstad].ToString());

                //if (bedehi > 0)
                //{

                //    rwm_Validations.RadAlert("به علت بدهی شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}
                // if (dtnaghs.Rows.Count > 0)
                //{

                //    rwm_Validations.RadAlert("به دلیل نقص پرونده شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}

                //if (dtReg.Rows.Count == 0)
                //{

                //    rwm_Validations.RadAlert("به دلیل عدم ثبت نام در ترم جاری شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}



                if (dt.Rows[0]["idvazkol"].ToString() == "7")
                {
                    rwm_Validations.RadAlert("فارغ التحصیلان به این بخش دسترسی ندارند", null, 100, "خطا", "CallBackConfirm2");
                }


                else
                {
                    lblstcode.Text          = Session[sessionNames.userID_StudentOstad].ToString();
                    RadListView2.DataSource = clsB.Show_Class_List(lblstcode.Text, ConfigurationManager.AppSettings["Term"].ToString());
                    RadListView2.DataBind();

                    foreach (RadListViewItem lvi in RadListView2.Items)
                    {
                        RadListView lstAsset  = (RadListView)lvi.FindControl("RadListView3");
                        Label       ClassCode = (Label)lvi.FindControl("ClassCode");
                        lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode((ClassCode.Text), ConfigurationManager.AppSettings["Term"].ToString());
                        lstAsset.DataBind();
                        //var Merge = lvi.FindControl("Merge_code");
                        //if (Merge != null)
                        //    btn_Select.Visible = false;
                        if (RadListView2.Items.Count > 0)
                        {
                            btn_Select.Visible = true;
                        }
                    }

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