コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.DrawingsRibbon());
            }

            //MasterPage.RequiredPermission = PERMISSIONID;
            MasterPage.IsSecure  = true;
            MasterPage.PageTitle = string.Format("{0}", "Prize Templates Add / Edit");

            if (!IsPostBack)
            {
                lblPK.Text = Request["PK"];
                if (lblPK.Text.Length == 0)
                {
                    dv.ChangeMode(DetailsViewMode.Insert);
                }
                else
                {
                    dv.ChangeMode(DetailsViewMode.Edit);
                }
                Page.DataBind();
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.DrawingsRibbon());
            }

            //MasterPage.RequiredPermission = PERMISSIONID;
            MasterPage.IsSecure  = true;
            MasterPage.PageTitle = string.Format("{0}", "Drawing Templates List");

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

                if (null != ViewState["_Direction_"])
                {
                    _mSortDirection = (SortDirection)ViewState["_Direction_"];
                }
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 4000;
            MasterPage.IsSecure           = true;
            MasterPage.PageTitle          = string.Format("{0}", "Manage Prize Drawing");

            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.DrawingsRibbon());

                lblPK.Text = Session["DID"] == null ? "" : Session["DID"].ToString(); //Session["DID"]= string.Empty;
                dv.ChangeMode(lblPK.Text.Length == 0 ? DetailsViewMode.Insert : DetailsViewMode.Edit);

                if (!string.IsNullOrEmpty(lblPK.Text))
                {
                    // look up eligible patrons for this drawing
                    int pdid = 0;
                    if (int.TryParse(lblPK.Text, out pdid))
                    {
                        try
                        {
                            EligibleCount.Value = PrizeDrawing.EligiblePatronCount(pdid).ToString();
                        } catch (Exception ex)
                        {
                            this.Log().Error("Unable to look up PrizeDrawing.EligiblePatronCount for {0}: {1} - {2}",
                                             pdid,
                                             ex.Message,
                                             ex.StackTrace);
                        }
                    }
                }

                Page.DataBind();
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 4000;
            MasterPage.IsSecure           = true;
            MasterPage.PageTitle          = string.Format("{0}", "Manage Prize Drawing");

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

            if (!IsPostBack)
            {
                lblPK.Text = Session["DID"] == null ? "" : Session["DID"].ToString(); //Session["DID"]= string.Empty;
                dv.ChangeMode(lblPK.Text.Length == 0 ? DetailsViewMode.Insert : DetailsViewMode.Edit);
                Page.DataBind();
            }
        }