Ejemplo n.º 1
0
        void CustomDialog1_ItemClick(object sender, Academic.ViewModel.IdAndNameEventArgs e)
        {
            //var selectedValue = ddlAddStudent.SelectedValue.ToString();
            switch (e.Id)
            {
            case -1:
                //MultiView1.ActiveViewIndex = 0;
                break;

            case 0:
                //create student
                Response.Redirect("~/Views/Student/Batch/Student/StudentCreate.aspx?pbId=" + ProgramBatchId);
                //MultiView1.ActiveViewIndex = 1;
                break;

            case 1:

                //MultiView1.ActiveViewIndex = 2;
                break;

            case 2:
                //import from file
                Response.Redirect("~/Views/Student/Batch/Student/ImportStudentFromFile.aspx?pbId=" + ProgramBatchId);
                //MultiView1.ActiveViewIndex = 3;
                break;
            }
            CustomDialog1.CloseDialog();
        }
Ejemplo n.º 2
0
 void CustomDialog1_ItemClick(object sender, IdAndNameEventArgs e)
 {
     //copy the year and sub-years from the choosen program  to this program
     if (e.Id == 0)
     {
         CustomDialog1.CloseDialog();
         return;
     }
     using (var helper = new DbHelper.Structure())
     {
         var copied = helper.CopyYearsAndSubyears(e.Id, ParentId);
         if (copied)
         {
             Response.Redirect("~/Views/Structure/?edit=1");
         }
         else
         {
             lblCopyError.Visible = true;
             CustomDialog1.CloseDialog();
         }
     }
 }