Exemple #1
0
    protected DataSet getSearchData()
    {
        //Get image data
        SearchRequest request = new SearchRequest();

        request.ScopeName     = this.cboDocClass.SelectedValue;
        request.DocumentClass = this.cboDocClass.SelectedValue;
        request.PropertyName  = this.cboProp1.SelectedValue;
        request.PropertyValue = this.txtSearch1.Text.Trim();
        if (this.txtSearch2.Text.Trim().Length > 0)
        {
            request.Operand1       = this.cboOperand1.SelectedValue;
            request.PropertyName1  = this.cboProp2.SelectedValue;
            request.PropertyValue1 = this.txtSearch2.Text.Trim();
        }
        if (this.txtSearch3.Text.Trim().Length > 0)
        {
            request.Operand2       = this.cboOperand2.SelectedValue;
            request.PropertyName2  = this.cboProp3.SelectedValue;
            request.PropertyValue2 = this.txtSearch3.Text.Trim();
        }
        if (this.txtSearch4.Text.Trim().Length > 0)
        {
            request.Operand3       = this.cboOperand3.SelectedValue;
            request.PropertyName3  = this.cboProp4.SelectedValue;
            request.PropertyValue3 = this.txtSearch4.Text.Trim();
        }
        Argix.Enterprise.ImagingGateway isvc = new Argix.Enterprise.ImagingGateway();
        return(isvc.SearchSharePointImageStore(request));
    }
Exemple #2
0
    //Members

    //Interface
    protected void Page_Load(object sender, EventArgs e)
    {
        //Page load event handler
        Argix.Enterprise.ImagingGateway svc = new Argix.Enterprise.ImagingGateway();
        try {
            this.txtSearchInfo.Text = svc.GetPortalSearchInfo();
        }
        catch (ApplicationException ex) { this.txtSearchInfo.Text = ex.ToString(); }
        try {
            this.txtMetaData.Text = svc.GetSearchMetadata();
        }
        catch (ApplicationException ex) { this.txtMetaData.Text = ex.ToString(); }
    }
Exemple #3
0
    //Members

    //Interface
    protected void Page_Load(object sender, EventArgs e)
    {
        //Event handler for page load event
        try {
            //Get query params
            string uri = Request.QueryString["uri"];

            //Return an image from SharePoint in the web reponse
            byte[] bytes  = new Argix.Enterprise.ImagingGateway().GetSharePointImageStream(uri);
            Stream stream = new MemoryStream(bytes);

            //Render as jpeg to browser
            HttpResponse response = this.Context.Response;
            response.Clear();
            response.ContentType  = "application/pdf";
            response.BufferOutput = false;
            response.BinaryWrite(bytes);
        }
        catch (Exception ex) { this.Context.Response.Write(ex.ToString()); }
    }
Exemple #4
0
    protected void OnPODRequest(object sender, EventArgs e)
    {
        //
        DataSet ds          = null;
        bool    imagesFound = false;

        try {
            if (this.lnkPODReq.Text == "Request POD")
            {
                sendPODRequest();
            }
            else
            {
                //Get all detail rows for this carton
                Argix.Enterprise.TrackingItem item = null;
                if (this.mLabelNumber.Length > 0)
                {
                    TrackingItems items = (TrackingItems)Session["TrackData"];
                    if (items != null)
                    {
                        //Find the items info for labelNumber
                        foreach (TrackingItem _item in items)
                        {
                            if (_item.LabelNumber == this.mLabelNumber)
                            {
                                //Get carton data and check for a POD image for this CBOL
                                item = _item;
                                string cl = item.Client.Trim().PadLeft(3, '0');
                                //string div = "01";      Can't wildcard div in KQL
                                string st   = item.StoreNumber.Trim().PadLeft(5, '0');
                                string cbol = item.CBOL.Trim();
                                if (cbol.Length > 0)
                                {
                                    ds          = new Argix.Enterprise.ImagingGateway().SearchSharePointImageStore(Application["ImagingDocClass"].ToString(), Application["ImagingPropertyName"].ToString(), cbol + cl + "*");
                                    imagesFound = (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Select("Store=" + st).Length > 0);
                                }
                                break;
                            }
                        }
                    }
                }
                else
                {
                    Master.ShowMessageBox("Could not find tracking information. Please return to tracking page and try again.");
                }

                if (imagesFound)
                {
                    //Images available- open images into other browser instances
                    StringBuilder sb = new StringBuilder();
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        if (ds.Tables[0].Rows[i]["Store"].ToString() == item.StoreNumber.Trim().PadLeft(5, '0'))
                        {
                            string uri = ds.Tables[0].Rows[i]["Path"].ToString();
                            sb.Append("window.open('PODImage.aspx?uri=" + uri + "', '_blank', 'width=480,height=576,menubar=yes,location=no,toolbar=no,status=yes,resizable=yes');");
                        }
                    }
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "POD Image", sb.ToString(), true);
                }
                else
                {
                    //Image(s) unavailable
                    ViewState.Add("PODRequestItem", item);
                    this.lnkPODReq.Text    = "Request POD";
                    this.lnkPODReq.ToolTip = "Request POD image(s) from Customer Service";
                    Master.ShowMessageBox("The POD was not be found. Click the Request POD link to request the POD from Customer Service.");
                }
            }
        }
        catch (Exception ex) { Master.ReportError(ex, 3); }
    }