protected void Page_Load(object sender, EventArgs e)
        {
            StiWebViewer1.Visible = false;
            if (!IsPostBack)
            {
                //
                string   mId    = Request.QueryString["id"].ToString();
                string[] id     = mId.ToString().Split(new char[] { '@' });
                string   menuId = "";
                for (int i = 0; i < id[1].Length; i++)
                {
                    string s = id[1].Substring(i + 1, 1);
                    if (s != "-")
                    {
                        menuId += s;
                    }
                    else
                    {
                        break;
                    }
                    Session[sessionNames.menuID] = menuId;
                }
                AccessControl1.MenuId = Session[sessionNames.menuID].ToString();
                AccessControl1.UserId = Session[sessionNames.userID_Karbar].ToString();
                //
                dtTerm = CB.SelectAllTerm();
                ddl_Term.DataTextField = "tterm";
                ddl_Term.DataSource    = dtTerm;
                ddl_Term.DataBind();
                ddl_Term.Items.Add(new ListItem("انتخاب کنید", "0"));
                ddl_Term.Items[ddl_Term.Items.Count - 1].Selected = true;
                if (Request.QueryString["Term"] != null)
                {
                    ddl_Term.SelectedValue = Request.QueryString["Term"].ToString();
                }
                dtNumClass = FRB.GetNumberClass();
                ddl_NumberClass.DataTextField  = "shom_klas";
                ddl_NumberClass.DataValueField = "id";
                ddl_NumberClass.DataSource     = dtNumClass;
                ddl_NumberClass.DataBind();
                ddl_NumberClass.Items.Add(new ListItem("انتخاب کنید", "."));
                ddl_NumberClass.Items[ddl_NumberClass.Items.Count - 1].Selected = true;
                if (Request.QueryString["NumberClass"] != null)
                {
                    ddl_NumberClass.SelectedValue = Request.QueryString["NumberClass"].ToString();
                }
                //dtLesson = CB.GetLesson();
                //ddl_Lesson.DataTextField = "namedars";
                //ddl_Lesson.DataValueField = "dcode";
                //ddl_Lesson.DataSource = dtLesson;
                //ddl_Lesson.DataBind();
                //ddl_Lesson.Items.Add(new ListItem("انتخاب کنید", "."));
                //ddl_Lesson.Items[ddl_Lesson.Items.Count - 1].Selected = true;
                ddl_Day.Items.Add(new ListItem("شنبه", "1"));
                ddl_Day.Items.Add(new ListItem("یکشنبه", "2"));
                ddl_Day.Items.Add(new ListItem("دوشنبه", "3"));
                ddl_Day.Items.Add(new ListItem("سه شنبه", "4"));
                ddl_Day.Items.Add(new ListItem("چهارشنبه", "5"));
                ddl_Day.Items.Add(new ListItem("پنج شنبه", "6"));
                ddl_Day.Items.Add(new ListItem("جمعه", "7"));
                ddl_Day.Items.Add(new ListItem("انتخاب کنید", "0"));
                ddl_Day.Items[ddl_Day.Items.Count - 1].Selected = true;
            }

            if (Session["code_ostad"] != null)
            {
                txt_CodeOstad.Text = Session["code_ostad"].ToString();
            }
        }