protected void Page_Load(object sender, EventArgs e)
    {
        section = new ClsTempSection("MasterSchedule");

        int.TryParse(Request["SectionsID"], out SectionsID);
        if (SectionsID <= 0)
        {
            Response.Redirect("~/?Error=SectionDetails.ascx+had+no+SectionID");
        }

        if (!IsPostBack)
        {
            if (string.IsNullOrEmpty(Request.QueryString["NewSectionID"]))
            {
                section.AddRecord();

                Response.Redirect(string.Format("~/ViewSection2.aspx?NewSectionID={0}&SectionsID={1}", section.SectionId.ToString(), Request.QueryString["SectionsID"]));
                SectionID.Value      = section.SectionId.ToString();
                Faculty1.sectionGUID = section.SectionId;
            }
            else
            {
                Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);;
                section.SectionId       = tempGuid;
                Session["NewSectionID"] = section.SectionId;
                Faculty1.sectionGUID    = tempGuid;
            }
        }
        else
        {
            section.SectionId = (Guid)Session["NewSectionID"];
            section.GetRecord();
            Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);
            Faculty1.sectionGUID = tempGuid;
        }

        Control       form = (Control)Page.Master.FindControl("form1");
        ScriptManager sm   = (ScriptManager)form.FindControl("ScriptManager1");

        //  sm.RegisterAsyncPostBackControl(gvPendingChanges);
        Session["usepreview"] = false;
        //if (divchairoption.Visible) { Session["usepreview"] = radSubmitOptions.SelectedIndex == 1; }
        //if (!IsPostBack)
        //{
        //    divchairoption.Visible = Helpers.UserIsDivisionChair();

        //}
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        section = new ClsTempSection("MasterSchedule");
        log     = new ClsChangeLog("MasterSchedule");
        Session["usepreview"] = false;
        //if (divchairoption.Visible) { Session["usepreview"] = radSubmitOptions.SelectedIndex == 1; }

        btnAddNewCourse.Attributes.Add("OnClick", "getList();");
        if (!IsPostBack)
        {
            if (string.IsNullOrEmpty(Request.QueryString["NewSectionID"]))
            {
                divchairoption.Visible     = Helpers.UserIsDivisionChair();
                MultiView1.ActiveViewIndex = 0;
                section.AddRecord();

                Response.Redirect(string.Format("~/add.aspx?NewSectionID={0}", section.SectionId.ToString()));
                //Session["NewSectionID"] = section.SectionID;
                SectionID.Value      = section.SectionId.ToString();
                Faculty1.sectionGUID = section.SectionId;
            }
            else
            {
                Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);
                section.SectionId       = tempGuid;
                Session["NewSectionID"] = section.SectionId;
                Faculty1.sectionGUID    = tempGuid;
            }
        }
        else
        {
            section.SectionId = (Guid)Session["NewSectionID"];
            section.GetRecord();
            Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);
            Faculty1.sectionGUID = tempGuid;
        }

        if (Request.Form["__EVENTTARGET"] != null)
        {
            if (Request.Form["__EVENTTARGET"] == "TargetItem")
            {
                btnAddNewCourse_Click();
            }
        }
    }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     section = new ClsTempSection("MasterSchedule");
     log     = new ClsChangeLog("MasterSchedule");
     Session["usepreview"] = false;
     if (divchairoption.Visible)
     {
         Session["usepreview"] = radSubmitOptions.SelectedIndex == 1;
     }
     if (!IsPostBack)
     {
         divchairoption.Visible     = Helpers.UserIsDivisionChair();
         MultiView1.ActiveViewIndex = 0;
         section.AddRecord();
         Session["NewSectionID"] = section.SectionId;
     }
     else
     {
         section.SectionId = (Guid)Session["NewSectionID"];
         section.GetRecord();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        section = new ClsTempSection("MasterSchedule");
        log     = new ClsChangeLog("MasterSchedule");
        Session["usepreview"] = false;
        //if (divchairoption.Visible) { Session["usepreview"] = radSubmitOptions.SelectedIndex == 1; }

        if (!IsPostBack)
        {
            if (string.IsNullOrEmpty(Request.QueryString["NewSectionID"]))
            {
                divchairoption.Visible           = Helpers.UserIsDivisionChair();
                mvSubmissionForm.ActiveViewIndex = 0;
                section.AddRecord();

                Response.Redirect(string.Format("~/add.aspx?NewSectionID={0}", section.SectionId.ToString()));
                //Session["NewSectionID"] = section.SectionID;
                SectionID.Value      = section.SectionId.ToString();
                Faculty1.sectionGUID = section.SectionId;
            }
            else
            {
                Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);
                section.SectionId       = tempGuid;
                Session["NewSectionID"] = section.SectionId;
                Faculty1.sectionGUID    = tempGuid;
            }
        }
        else
        {
            section.SectionId = (Guid)Session["NewSectionID"];
            section.GetRecord();
            Guid tempGuid = new Guid(Request.QueryString["NewSectionID"]);
            Faculty1.sectionGUID = tempGuid;
        }
    }