//for other control in which loading control will occur
 private void GetOrderDetails(int orderId)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >
         {
             new KeyValuePair <string, object>("@OrderId", orderId)
         };
         SQLHandler sqlH        = new SQLHandler();
         OrderLabel orderDetail = sqlH.ExecuteAsObject <OrderLabel>("usp_Aspx_GetOrderDetailByOrderIdForLabel",
                                                                    parameter);
         Session["labelOrderInfo"] = orderDetail;
         string path = GetProviderSourceLocation(orderDetail.ShippingMethodId);
         //if only provider is realtime
         if (!string.IsNullOrEmpty(path))
         {
             string controlPath = ResolveUrl(@"~/" + path);
             BaseAdministrationUserControl uc = (BaseAdministrationUserControl)Page.LoadControl(controlPath);
             phShippingLabelHolder.Controls.Add(uc);
         }
         else
         {
             //start Custom printing Label
             dvCustomLabelCreater.Visible = true;
             ClearSession(orderId);
             GetOrderDetails(_storeId, _portalId, orderId, GetCurrentCultureName);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
    private void LoadControl(string path)
    {
        Session["_trk_path"] = path;
        string controlPath = ResolveUrl(@"~/" + path);
        BaseAdministrationUserControl uc = (BaseAdministrationUserControl)Page.LoadControl(controlPath);

        dvTrackCustom.Visible = false;
        ClearCustomForm();
        phTrackPackageHolder.Controls.Clear();
        phTrackPackageHolder.Controls.Add(uc);
    }
Ejemplo n.º 3
0
    private void LoadControl()
    {
        if (IsPostBack)
        {
            if (Session["_trk_providerId"] != null)
            {
                string id = Session["_trk_providerId"].ToString();

                //if (id != rblProviderList.SelectedValue)
                //{
                //    rblProviderList_SelectedIndexChanged(this, EventArgs.Empty);

                //}
                if (id == rblProviderList.SelectedValue)
                {
                    if (Session["_trk_path"] != null)
                    {
                        string path        = Session["_trk_path"].ToString();
                        string controlPath = ResolveUrl(@"~/" + path);
                        BaseAdministrationUserControl uc = (BaseAdministrationUserControl)Page.LoadControl(controlPath);
                        dvTrackCustom.Visible = false;
                        phTrackPackageHolder.Controls.Clear();
                        phTrackPackageHolder.Controls.Add(uc);
                        _loaded = true;
                    }
                    else
                    {
                        dvTrackCustom.Visible = true;
                    }
                }
            }
        }
        else
        {
            if (Session["_trk_providerId"] != null)
            {
                rblProviderList.SelectedValue = Session["_trk_providerId"].ToString();
                if (Session["_trk_path"] != null)
                {
                    string path        = Session["_trk_path"].ToString();
                    string controlPath = ResolveUrl(@"~/" + path);
                    BaseAdministrationUserControl uc = (BaseAdministrationUserControl)Page.LoadControl(controlPath);
                    dvTrackCustom.Visible = false;
                    phTrackPackageHolder.Controls.Clear();
                    phTrackPackageHolder.Controls.Add(uc);
                }
                else
                {
                    rblProviderList_SelectedIndexChanged(this, EventArgs.Empty);
                }
            }
        }
    }
    private bool CheckAuthentication()
    {
        BaseAdministrationUserControl obj = new BaseAdministrationUserControl();
        int userModuleId = int.Parse(Request.QueryString["userModuleId"].ToString());

        SageFrame.Services.AuthenticateService objAuthentication = new SageFrame.Services.AuthenticateService();
        PageBase objPageBase = new PageBase();

        if (objAuthentication.IsPostAuthenticatedView(obj.GetPortalID, userModuleId, obj.GetUsername, objPageBase.SageFrameSecureToken))
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }