protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GroupList.Items.Clear();
                foreach (GroupName gr in Enum.GetValues(typeof(GroupName)))
                {
                    GroupList.Items.Add(gr.ToString());
                    if (gr.ToString() == Request.Params["group"])
                    {
                        GroupList.SelectedIndex = GroupList.Items.Count - 1;
                    }
                }
                CampusCostBox.Text    = DataService.campus_cost.ToString();
                CampusCostBox.Enabled = false;
            }
            GroupName groupName = GroupName.Group1;

            foreach (GroupName gr in Enum.GetValues(typeof(GroupName)))
            {
                if (gr.ToString() == GroupList.SelectedItem.Value)
                {
                    groupName = gr;
                }
            }
            StudentsRepeater.DataSource = DataService.GetStudentsByGroup(groupName);
            StudentsRepeater.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownListSpecialityCode.Items.Clear();
                DropDownListSpecialityCode.Items.Add(КодСпециальности.КБ.ToString());
                DropDownListSpecialityCode.Items.Add(КодСпециальности.ММ.ToString());
                DropDownListSpecialityCode.Items.Add(КодСпециальности.МТТ.ToString());
                DropDownListSpecialityCode.Items.Add(КодСпециальности.ПМИ.ToString());
            }

            if (Request.Params["code"] != null)
            {
                var кодСтудента = Request.Params["code"];
                DataServiceProvider.Current.DeleteStudent(кодСтудента);
                var newUri = Request.Url.AbsoluteUri.Substring(0, Request.Url.AbsoluteUri.IndexOf(Request.Url.Query, StringComparison.Ordinal));
                Response.Redirect(newUri);
            }

            StudentsRepeater.DataSource = DataServiceProvider.Current.GetAllStudents();
            StudentsRepeater.DataBind();

            if (Session["IsStudentAdded"] != null && (bool)Session["IsStudentAdded"])
            {
                ClearControls();
                Session["IsStudentAdded"] = null;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GroupList.Items.Clear();
         GroupList.Items.Add(GroupName.Group1.ToString());
         GroupList.Items.Add(GroupName.Group2.ToString());
         GroupList.Items.Add(GroupName.Group3.ToString());
         GroupList.Items.Add(GroupName.Group4.ToString());
         CampusCostBox.Text = DataService.campus_cost.ToString();
     }
     if (Request.Params["student"] != null)
     {
         string student = Request.Params["student"];
         DataService.DeleteStudent(student);
         var newUri = Request.Url.AbsoluteUri.Substring(0, Request.Url.AbsoluteUri.IndexOf(Request.Url.Query, StringComparison.Ordinal));
         Response.Redirect(newUri);
     }
     StudentsRepeater.DataSource = DataService.GetAllStudents();
     StudentsRepeater.DataBind();
 }