コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.IsSecure  = true;
            MasterPage.PageTitle = string.Format("{0}", "Patron Questions");


            _mStrSortExp = String.Empty;
            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.NotificationsRibbon());
                _mStrSortExp = String.Empty;
            }
            else
            {
                if (null != ViewState["_SortExp_"])
                {
                    _mStrSortExp = ViewState["_SortExp_"] as String;
                }

                if (null != ViewState["_Direction_"])
                {
                    _mSortDirection = (SortDirection)ViewState["_Direction_"];
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Curr_Notification_ID"] != null && Session["Curr_Notification_ID"].ToString() != "")
            {
                string editpage = "~/ControlRoom/Modules/Notifications/QuestionView.aspx";

                int key = Convert.ToInt32(Session["Curr_Notification_ID"]);

                var n = DAL.Notifications.FetchObject(key);
                if (n != null)
                {
                    var pid = n.PID_From;


                    Session["CURR_PATRON_ID"]   = pid;
                    Session["CURR_PATRON"]      = Patron.FetchObject(pid);
                    Session["CURR_PATRON_MODE"] = "EDIT";

                    Response.Redirect(String.Format("{0}?PK={1}", editpage, Session["Curr_Notification_ID"].ToString()));
                }
            }

            Response.Redirect("NotificationList.aspx");
            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.NotificationsRibbon());
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5000;
            MasterPage.IsSecure           = true;
            if (Session["Curr_Patron"] == null)
            {
                Response.Redirect("Default.aspx");
            }

            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.NotificationsRibbon());
                PatronsRibbon.GetByAppContext(this);

                var patron = (Patron)Session["Curr_Patron"];
                MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Notification", patron.FirstName, patron.LastName, patron.Username);
            }

            if (!IsPostBack)
            {
                lblPK.Text = Request["PK"];
                if (lblPK.Text.Length == 0)
                {
                    dv.ChangeMode(DetailsViewMode.Insert);
                    Session["Curr_Notification_ID"] = lblPK.Text;
                }
                else
                {
                    dv.ChangeMode(DetailsViewMode.Edit);
                }
                Page.DataBind();
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5000;
            MasterPage.IsSecure           = true;
            MasterPage.PageTitle          = string.Format("{0}", "Bulk Notification");

            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.NotificationsRibbon());
            }
        }