示例#1
0
    private TrackableCouponProgram GetProgramByID(Int32 pID)
    {
        tcpService = CurrentRequest.Resolver.Resolve <ITrackableCouponProgramService>();
        AMSResult <TrackableCouponProgram> tcProgram = SystemCacheData.GetSystemOption_UE_ByOptionId(152) == "0" ? tcpService.GetTrackableCouponProgramById(pID) : tcpService.GetTrackableCouponProgramById(pID, true);

        if (tcProgram.ResultType != AMSResultType.Success)
        {
            DisplayError(tcProgram.GetLocalizedMessage <TrackableCouponProgram>(LanguageID));
            return(null);
        }
        else
        {
            return((TrackableCouponProgram)tcProgram.Result);
        }
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            (this.Master as logix_LogixMasterPage).Tab_Name            = "5_3_2";
            (this.Master as logix_LogixMasterPage).OnOverridePageMenu += new logix_LogixMasterPage.OverridePageMenu(logix_tcp_edit_OnOverridePageMenu);

            btnDelete.Attributes.Add("onclick", "return confirm('" + PhraseLib.Lookup("term.confirmdeleteprogram", LanguageID) + "')");
            if (!Page.IsPostBack)
            {
                //CSRF CODE ENDS

                //Set Anti-XSRF token
                ViewState[AntiXsrfTokenKey] = Page.ViewStateUserKey;

                //If a user name is assigned, set the user name
                ViewState[AntiXsrfUserNameKey] =
                    Context.User.Identity.Name ?? String.Empty;

                //CSRF CODE ENDS

                TrackableCouponProgram tcProgram = VerifyPageUrl();
                FillPageControlText(tcProgram);
                AssignPageTitle("term.trackablecouponprogram", String.Empty, ProgramID.ToString());
                ApplyPermission();
                if (SystemCacheData.GetSystemOption_UE_ByOptionId(152) == "0")
                {
                    lblCouponusCount.Visible = false;
                    CouponCount.Visible      = false;
                }
            }
            else
            {
                //Validate the Anti-XSRF token
                if ((string)ViewState[AntiXsrfTokenKey] != _antiXsrfTokenValue || (string)ViewState[AntiXsrfUserNameKey] != (Context.User.Identity.Name ?? String.Empty))
                {
                    throw new InvalidOperationException("Validation of Anti - XSRF token failed.");
                }
            }
            ucNotes_Popup.NotesUpdate += new EventHandler(ucNotes_Popup_NotesUpdate);
            SetUpUserControls();
            txtName.Focus();
        }
        catch (Exception ex)
        {
            DisplayError(ErrorHandler.ProcessError(ex));
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        infobar.Attributes["style"]   = "display: none;";
        infobar.InnerText             = String.Empty;
        statusbar.Attributes["style"] = "display: none;";
        infobar.InnerText             = String.Empty;
        deleteItems.Text = PhraseLib.Lookup("term.deleteallitems", LanguageID);
        cancel.Text      = PhraseLib.Lookup("term.cancel", LanguageID);

        copyPG.Text       = PhraseLib.Lookup("term.copyPG", LanguageID);
        copyPG.ToolTip    = PhraseLib.Lookup("term.copyPG", LanguageID);
        cancel1.Text      = PhraseLib.Lookup("term.cancel", LanguageID);
        cancel1.ToolTip   = PhraseLib.Lookup("term.cancel", LanguageID);
        canceldeploy.Text = PhraseLib.Lookup("term.cancelcollisiondetection", LanguageID);
        if (CurrentUser.UserPermissions.EditOffer == false)
        {
            rdResolution.Items[0].Enabled = false;
            rdResolution.Items[1].Enabled = false;
        }
        if (!Page.IsPostBack)
        {
            AdminUserID = ((AuthenticatedUI)this.Page).CurrentUser.AdminUser.ID;
            ((logix_LogixMasterPage)this.Master).Tab_Name = "2_7";
            AssignPageTitle("term.collisionreport");
            if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
            {
                iOfferID_CDS = Convert.ToInt64(Request.QueryString["ID"]);
            }
            else
            {
                Response.Redirect("CollidingOffers-list.aspx");
            }

            lblOfferID.Text = iOfferID_CDS.ToString();
            CollisionDetectionServiceURL = SystemCacheData.GetSystemOption_UE_ByOptionId(185).TrimEnd('/');
            InitializePhrases();
            BindGrid(Convert.ToInt32(lblOfferID.Text), pageIndex, "ExtProductID", "Desc");
            BindOffer(Convert.ToInt32(lblOfferID.Text));
            CheckCDStatus();
            BindPGOfferList();
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     AdminUserID   = ((AuthenticatedUI)this.Page).CurrentUser.AdminUser.ID;
     lblTitle.Text = Copient.PhraseLib.Lookup("term.collisionreports", LanguageID);
     ((logix_LogixMasterPage)this.Master).Tab_Name = "2_7";
     AssignPageTitle("term.collisionreports");
     infobar.Style["display"] = "none";
     ListSearch.OnSearch     += new EventHandler(btnSearch_Click);
     GetSearchText();
     CollisionDetectionServiceURL = SystemCacheData.GetSystemOption_UE_ByOptionId(185).TrimEnd('/');
     if (String.IsNullOrWhiteSpace(CollisionDetectionServiceURL))
     {
         DisplayError(PhraseLib.Lookup("term.undefinedcollisionserviceurl", LanguageID));
         return;
     }
     TenantID = "0";
     if (!IsPostBack)
     {
         gvCollidingOfferList.SortKey   = "CollisionRanOn";
         gvCollidingOfferList.SortOrder = "Desc";
         FetchData(PageIndex);
     }
 }