Exemplo n.º 1
0
    private GenericCollection <PurchaseOrderBE> ModifyExtranetPODetails(GenericCollection <PurchaseOrderBE> CorpnetPOlist)
    {
        PurchaseOrderBC objBC = new PurchaseOrderBC();
        GenericCollection <PurchaseOrderBE> ExtranetList = new GenericCollection <PurchaseOrderBE>();


        ExtranetList = objBC.ModifyExtranetPODetails(txtPONumber.Text, "PoDetails");

        foreach (PurchaseOrderBE ExtobjBE in ExtranetList)
        {
            foreach (PurchaseOrderBE CorpObjBE in CorpnetPOlist)
            {
                if (ExtobjBE.ReferenceID == CorpObjBE.ReferenceID)
                {
                    CorpObjBE.ExtranetStatus = ExtobjBE.ExtranetStatus;
                    if (ExtobjBE.POCBODRcvd == "Error_NotRcvdConfirmBODFrmPartnerEx")
                    {
                        CorpObjBE.POCBODRcvd = "NoBOD";
                    }
                    if (ExtobjBE.POCBODRcvd == "PositiveConfirmBODReceived")
                    {
                        CorpObjBE.POCBODRcvd = "PosBOD";
                    }
                    if (ExtobjBE.POCBODRcvd == "NegativeConfirmBODReceived")
                    {
                        CorpObjBE.POCBODRcvd = "NegBOD";
                    }
                }
            }
        }

        return(CorpnetPOlist);
    }
Exemplo n.º 2
0
    private GenericCollection <PurchaseOrderBE> GetASNStatus(GenericCollection <PurchaseOrderBE> CorpnetPOlist)
    {
        PurchaseOrderBC objBC = new PurchaseOrderBC();
        GenericCollection <PurchaseOrderBE> ExtranetList = new GenericCollection <PurchaseOrderBE>();
        string POList           = @"'";
        string ExtranetPartners = ConfigurationSettings.AppSettings["ExtranetCMS"];

        foreach (PurchaseOrderBE objBE in CorpnetPOlist)
        {
            if (ExtranetPartners.Contains(objBE.CM))
            {
                POList += objBE.PONumber + @"','";
            }
        }

        ExtranetList = objBC.GetASNStatus(POList);

        foreach (PurchaseOrderBE ExtobjBE in ExtranetList)
        {
            foreach (PurchaseOrderBE CorpObjBE in CorpnetPOlist)
            {
                if (ExtobjBE.PONumber == CorpObjBE.PONumber)
                {
                    CorpObjBE.ExtranetStatus = ExtobjBE.ExtranetStatus;
                }
            }
        }

        return(CorpnetPOlist);
    }
Exemplo n.º 3
0
    private void BindPurchaseOrder()
    {
        PurchaseOrderBC objBC = new PurchaseOrderBC();

        try
        {
            trPODetails.Visible = false;
            DateTime?DateFrom = txtDateFrom.Text == "" ? Convert.ToDateTime("1/1/1990") : Convert.ToDateTime(txtDateFrom.Text);
            DateTime?DateTo   = txtDateFrom.Text == "" ? Convert.ToDateTime("12/31/2050") : Convert.ToDateTime(txtDateTo.Text);
            GenericCollection <PurchaseOrderBE> listOfBE = objBC.GetPurchaseOrdersList(drdTxnType.SelectedValue, drdServiceComponentPartnerSearch.SelectedValue, DateFrom, DateTo, txtPONumber.Text.Trim());

            listOfBE = ModifyExtranetPOStatus(listOfBE);

            //listOfBE = GetASNStatus(listOfBE);


            if (ViewState[grdPageSize] != null)
            {
                gvPurchaseOrder.PageSize = Convert.ToInt32(ViewState[grdPageSize].ToString());
            }
            else
            {
                gvPurchaseOrder.PageSize = 10;
            }


            lblRec.Text             = Utils.GridRecDispMsg(gvPurchaseOrder.PageIndex, gvPurchaseOrder.PageSize, listOfBE.Count);
            gvPurchaseOrder.Visible = true;
            if (listOfBE != null && listOfBE.Count > 0)
            {
                rowPage.Visible            = true;
                rowGrid.Visible            = true;
                gvPurchaseOrder.DataSource = listOfBE;
                gvPurchaseOrder.DataBind();
                lblRec.Text             = Utils.GridRecDispMsg(gvPurchaseOrder.PageIndex, gvPurchaseOrder.PageSize, listOfBE.Count);
                gvPurchaseOrder.Visible = true;
                lblRec.Visible          = true;
                lblSearchError.Visible  = false;
            }
            else
            {
                lblRec.Visible             = false;
                rowGrid.Visible            = false;
                rowPage.Visible            = false;
                gvPurchaseOrder.Visible    = false;
                gvPurchaseOrder.DataSource = null;
                gvPurchaseOrder.DataBind();
                lblSearchError.Text    = "o Records available for the following Selection, Please change your selection and try once again.";
                lblSearchError.Visible = true;
            }
            Session[vPOList] = listOfBE;
        }
        catch (Exception ex)
        {
            lblSearchError.Text    = ex.Message;
            lblSearchError.Visible = true;
            logFile.ErrorLogging(ex);
        }
    }
Exemplo n.º 4
0
    private void LoadPOFiles(string Archivepath, string TransactionID, string CorpStatus, string ExtStatus, string TxnType, string PONumber, string PODate, string Partner, string IsICOE, string BOD)
    {
        PurchaseOrderBC objBC        = new PurchaseOrderBC();
        PurchaseOrderBE objArchiveBE = objBC.LoadPOFiles(TransactionID);

        objArchiveBE.PODate             = PODate;
        objArchiveBE.PONumber           = PONumber;
        objArchiveBE.ExtranetStatus     = ExtStatus;
        objArchiveBE.CorpnetStatus      = CorpStatus;
        objArchiveBE.CM                 = Partner;
        objArchiveBE.ReferenceID        = TransactionID;
        objArchiveBE.isICOEPartner      = IsICOE;
        objArchiveBE.MessageArchivePath = Archivepath;
        objArchiveBE.POCBODRcvd         = BOD;
        Session["ArchiveFiles"]         = objArchiveBE;
        Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowNewPage();", true);
    }
Exemplo n.º 5
0
    //private GenericCollection<ShowShipHeaderBE> PrepareShowShipDetails(GenericCollection<ShowShipHeaderBE> listOfBE)
    //{
    //    TransactionBC objTranBC = new TransactionBC();
    //    PurchaseOrderBC objBC = new PurchaseOrderBC();
    //    GenericCollection<ShowShipHeaderBE> ShowShipList = new GenericCollection<ShowShipHeaderBE>();
    //    for (int i = 0; i < listOfBE.Count; i++)
    //    {
    //        ShowShipHeaderBE objBE = new ShowShipHeaderBE();
    //        objBE.SNo = i;
    //        objBE.TxnType = "3B2";
    //        objBE.TxnDate = listOfBE[i].TxnDate;
    //        //string File = listOfBE[0].ArchiveFile;
    //        XmlDocument ShowShipFile = new XmlDocument();
    //        //ShowShipFile.Load(@"D:\BPM\SampleFiles\ShowShipEGLFiles.xml");
    //        ShowShipFile.Load(listOfBE[i].ArchiveFile);
    //        objBE.ArchiveFile = listOfBE[i].ArchiveFile;
    //        XmlNamespaceManager namespaceManager = new XmlNamespaceManager(ShowShipFile.NameTable);
    //        namespaceManager.AddNamespace("ns0", "http://MS.IT.Ops.HED.ShowShipment_V02_00_00");

    //        XmlNode xPartnerNode = ShowShipFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/ApplicationArea/Sender/ns0:LogicalId", namespaceManager);
    //        objBE.CM = xPartnerNode == null ? "" : objBC.GetPartnerName(xPartnerNode.InnerText);
    //        objBE.CM = objBE.CM == "" ? xPartnerNode.InnerText : objBE.CM;

    //        XmlNode xASTransactionID = ShowShipFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/ApplicationArea/ns0:ReferenceId", namespaceManager);
    //        objBE.ASFeedTxnID = xASTransactionID == null ? "" : xASTransactionID.InnerText;

    //        XmlNode xReceiverKey = ShowShipFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/routing/ReceiverKey", namespaceManager);
    //        objBE.ReceiverKey = xReceiverKey == null ? "" : xReceiverKey.InnerText;

    //        XmlNode xShipDate = ShowShipFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/TransportationEvent/ns0:DateTime", namespaceManager);
    //        if (xShipDate != null)
    //        {
    //            try
    //            {
    //                objBE.ShipDate = Convert.ToDateTime(xShipDate.InnerText.Substring(0, 4) + "-" + xShipDate.InnerText.Substring(4, 2) + "-" + xShipDate.InnerText.Substring(6, 2));
    //            }
    //            catch (Exception ex)
    //            {

    //            }
    //        }

    //        XmlNodeList PartiesNodeList = ShowShipFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/Parties", namespaceManager);
    //        XmlNodeList TrackingReferenceNodes = ShowShipFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/TrackingReference", namespaceManager);
    //        XmlNodeList LineItemNodes = ShowShipFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/LineItem", namespaceManager);

    //        if (LineItemNodes != null)
    //            objBE.LineCount = LineItemNodes.Count;


    //        foreach (XmlNode xnd in PartiesNodeList)
    //        {
    //            if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Originating Party")
    //            {
    //                XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
    //                objBE.OriginationParty = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
    //                objBE.OriginationParty = objBE.OriginationParty == "" ? xCMNode.InnerText : objBE.OriginationParty;
    //            }
    //            if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Selling Partner")
    //            {
    //                XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
    //                objBE.SellingPartner = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
    //                objBE.SellingPartner = objBE.SellingPartner == "" ? xCMNode.InnerText : objBE.SellingPartner;
    //            }
    //            if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Ship To")
    //            {
    //                XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
    //                objBE.SAPShipTo = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
    //                objBE.SAPShipTo = objBE.SAPShipTo == "" ? xCMNode.InnerText : objBE.SAPShipTo;
    //            }

    //            if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Freight Forwarder")
    //            {
    //                XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
    //                objBE.FMV = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
    //                objBE.FMV = objBE.FMV == "" ? xCMNode.InnerText : objBE.FMV;
    //            }
    //        }
    //        foreach (XmlNode xnd in TrackingReferenceNodes)
    //        {
    //            if (xnd.SelectSingleNode("ns0:TrackingCode", namespaceManager).InnerText == "Load Identifier")
    //            {
    //                XmlNode xCMNode = xnd.SelectSingleNode("ns0:TrackingId", namespaceManager);
    //                objBE.LoadID = xCMNode == null ? "" : xCMNode.InnerText.Substring(0, xCMNode.InnerText.Length - 2);
    //            }
    //        }
    //        GenericCollection<ShowShipLinesBE> objLinesList = new GenericCollection<ShowShipLinesBE>();
    //        int j = 0;
    //        foreach (XmlNode xnd in LineItemNodes)
    //        {
    //            ShowShipLinesBE objLineBE = new ShowShipLinesBE();
    //            XmlNodeList LineDocRefNodes = ShowShipFile.SelectNodes("/ns0:ShowShipment_V02_00_00/DataArea/Shipment/LineItem/DocumentReference", namespaceManager);
    //            foreach (XmlNode xndDoc in LineDocRefNodes)
    //            {
    //                if (xndDoc.SelectSingleNode("ns0:DocumentTypeCode", namespaceManager).InnerText == "Packing Slip Number")
    //                {
    //                    XmlNode xCMNode = xndDoc.SelectSingleNode("ns0:Id", namespaceManager);
    //                    objLineBE.PackSlipNumber = xPartnerNode == null ? "" : xCMNode.InnerText;
    //                }
    //                if (xndDoc.SelectSingleNode("ns0:DocumentTypeCode", namespaceManager).InnerText == "Purchase Order")
    //                {
    //                    XmlNode xCMNode = xndDoc.SelectSingleNode("ns0:Id", namespaceManager);
    //                    objLineBE.PONumber = xPartnerNode == null ? "" : xCMNode.InnerText;
    //                    XmlNode xLineNumber = xndDoc.SelectSingleNode("ns0:LineNumber", namespaceManager);
    //                    objLineBE.LineNumber = xLineNumber == null ? "" : xLineNumber.InnerText;
    //                }
    //            }
    //            XmlNode xSKUNode = xnd.SelectSingleNode("OrderItem/ns0:ProductIdentifier", namespaceManager);
    //            objLineBE.SKU = xSKUNode == null ? "" : xSKUNode.InnerText;
    //            XmlNode xUnitsShippedNode = xnd.SelectSingleNode("ns0:UnitsShipped", namespaceManager);
    //            objLineBE.ItemQuantity = xUnitsShippedNode == null ? "" : xUnitsShippedNode.InnerText;
    //            objLinesList.Add(j, objLineBE);
    //            j++;
    //        }
    //        objBE.ShowShipLines = objLinesList;
    //        if (objBE.LineCount == 1 && objLinesList != null)
    //            objBE.PONumber = objLinesList[0].PONumber;
    //        else
    //            objBE.PONumber = "See Details";
    //        ShowShipList.Add(i, objBE);
    //    }
    //    return ShowShipList;
    //}

    protected void gvDO_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            //if (e.CommandName == "ViewDetails")
            //{
            //    ImageButton lb = (ImageButton)e.CommandSource;
            //    GridViewRow gvr = (GridViewRow)lb.NamingContainer;
            //    GridView gridview = gvr.NamingContainer as GridView;
            //    int index = Convert.ToInt32(e.CommandArgument);
            //    GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];
            //    Label lblSNo = (Label)selectedRow.FindControl("lblSNo");
            //    GenericCollection<ShowShipHeaderBE> listOfBE = (GenericCollection<ShowShipHeaderBE>)Session[vDOList];
            //    GenericCollection<ShowShipLinesBE> lines = new GenericCollection<ShowShipLinesBE>();
            //    ShowShipHeaderBE Headerobj = new ShowShipHeaderBE();

            //    foreach (ShowShipHeaderBE obj in listOfBE)
            //    {
            //        if (obj.SNo.ToString() == lblSNo.Text)
            //        {
            //            Headerobj = obj;
            //            break;
            //        }
            //    }

            //    lines = Headerobj.ShowShipLines;
            //    trPODetails.Visible = false;
            //    Session["ShowShipLineCollection"] = lines;
            //    databind();
            //}
            if (e.CommandName == "ViewFiles")
            {
                ImageButton lb          = (ImageButton)e.CommandSource;
                GridViewRow gvr         = (GridViewRow)lb.NamingContainer;
                GridView    gridview    = gvr.NamingContainer as GridView;
                int         index       = Convert.ToInt32(e.CommandArgument);
                GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];

                Label lblSNo           = (Label)selectedRow.FindControl("lblSNo");
                Label lblTransactionID = (Label)selectedRow.FindControl("lblTransactionID");
                Label lblDONumber      = (Label)selectedRow.FindControl("lblDONumber");
                GenericCollection <DeliveryShipmentBE> listOfBE = (GenericCollection <DeliveryShipmentBE>)Session[vDOList];
                DeliveryShipmentBE Headerobj = new DeliveryShipmentBE();

                foreach (DeliveryShipmentBE obj in listOfBE)
                {
                    if (obj.SNo.ToString() == lblSNo.Text)
                    {
                        Headerobj = obj;
                        break;
                    }
                }

                TransactionBC objBC = new TransactionBC();
                GenericCollection <DeliveryShipmentBE> ArchiveObjects = new GenericCollection <DeliveryShipmentBE>();
                ArchiveObjects = objBC.GetDeliveryShipmentDetails("Files", lblTransactionID.Text, lblDONumber.Text, "", "", "", "", "", null, null);
                Headerobj.DOIDOCArchiveFile          = ArchiveObjects[0].DOIDOCArchiveFile;
                Headerobj.ProcessShipmentArchiveFile = ArchiveObjects[0].ProcessShipmentArchiveFile;
                Session["ArchiveFiles"] = Headerobj;
                Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowNewPage();", true);
            }
            if (e.CommandName == "ViewError")
            {
                ImageButton lb          = (ImageButton)e.CommandSource;
                GridViewRow gvr         = (GridViewRow)lb.NamingContainer;
                GridView    gridview    = gvr.NamingContainer as GridView;
                int         index       = Convert.ToInt32(e.CommandArgument);
                GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];

                Label lblTransactioID = (Label)selectedRow.FindControl("lblTransactionID");
                Label lblDONumber     = (Label)selectedRow.FindControl("lblDONumber");

                PurchaseOrderBC objBC        = new PurchaseOrderBC();
                string          Error        = objBC.LoadPOErrorMessage(lblDONumber.Text, lb.ID == "imgStatus" ? "Extranet" : "Corpnet");
                string          PoNumber     = " Transaction ID : " + lblTransactioID.Text + " \\n Delivery Order : " + lblDONumber.Text + " \\n Error Details : \\n ";
                string          errormessage = "Error Number : " + Error.Split(',')[0] + " \\n Error Description : \\n " + Error.Split(',')[1];
                //Label LabelTxnType = (Label)selectedRow.FindControl("LabelTxnType");
                string Eror = "My Error";
                //ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowMessage();", true);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Registering", "$(document).ready(function(){ ShowMessage('" + lblTransactioID.Text + "','" + lblDONumber.Text + "','" + Error.Split(',')[0] + "','" + Error.Split(',')[1] + "'); });", true);
            }
        }
        catch (Exception ex)
        {
        }
    }
Exemplo n.º 6
0
    private void BindDeliveryOrder()
    {
        TransactionBC   objBC    = new TransactionBC();
        PurchaseOrderBC objPucBC = new PurchaseOrderBC();

        try
        {
            DateTime?DateFrom = txtDateFrom.Text == "" ? Convert.ToDateTime("1/1/1990") : Convert.ToDateTime(txtDateFrom.Text);
            DateTime?DateTo   = txtDateTo.Text == "" ? Convert.ToDateTime("12/31/2050") : Convert.ToDateTime(txtDateTo.Text);
            GenericCollection <DeliveryShipmentBE> listOfBE = objBC.GetDeliveryShipmentDetails("Get", TxtIDOC.Text.Trim(), txtDO.Text.Trim(), txtPO.Text.Trim(), drdStatus.SelectedValue, drdServiceComponentPartnerSearch.SelectedValue, txtPlant.Text.Trim(), txtOrderType.Text.Trim(), DateFrom, DateTo);

            foreach (DeliveryShipmentBE obj in listOfBE)
            {
                string PartnerName = objPucBC.GetPartnerName(obj.Plant);
                obj.CM = PartnerName == "" ? obj.CM : PartnerName;
            }

            Session[vDOList] = listOfBE;



            if (ViewState[grdPageSize] != null)
            {
                gvDO.PageSize = Convert.ToInt32(ViewState[grdPageSize].ToString());
            }
            else
            {
                gvDO.PageSize = 10;
            }


            lblRec.Text  = Utils.GridRecDispMsg(gvDO.PageIndex, gvDO.PageSize, listOfBE.Count);
            gvDO.Visible = true;
            if (listOfBE != null && listOfBE.Count > 0)
            {
                rowPage.Visible = true;
                rowGrid.Visible = true;

                gvDO.DataSource = listOfBE;
                gvDO.DataBind();
                lblRec.Text    = Utils.GridRecDispMsg(gvDO.PageIndex, gvDO.PageSize, listOfBE.Count);
                gvDO.Visible   = true;
                lblRec.Visible = true;
            }
            else
            {
                lblRec.Visible  = false;
                rowGrid.Visible = false;
                rowPage.Visible = false;


                gvDO.Visible    = false;
                gvDO.DataSource = null;
                gvDO.DataBind();
                lblSearchError.Text    = "No records found.";
                lblSearchError.Visible = true;
            }
        }
        catch (Exception ex)
        {
            lblSearchError.Text    = ex.Message;
            lblSearchError.Visible = true;
            logFile.ErrorLogging(ex);
        }
    }
Exemplo n.º 7
0
    private void LoadPODetails(string PoNumber, string POFile, string MessageType)
    {
        try
        {
            PurchaseOrderBC objBC = new PurchaseOrderBC();
            //string ArchiveFile = objBC.GetPOArchiveFile(PONumber);

            XmlDocument poFile = new XmlDocument();
            poFile.Load(POFile);
            string RootNode = "";
            XmlNamespaceManager namespaceManager = new XmlNamespaceManager(poFile.NameTable);
            if (MessageType.ToLower() == "http://ms.it.ops.cm.processpurchaseorder_v02_10_00#processpurchaseorder_v02_10_00")
            {
                namespaceManager.AddNamespace("ns0", "http://MS.IT.Ops.CM.ProcessPurchaseOrder_V02_10_00");
                RootNode = "ProcessPurchaseOrder_V02_10_00";
            }
            else
            {
                namespaceManager.AddNamespace("ns0", "http://MS.IT.Ops.CM.ChangePurchaseOrder_V01_00_00");
                RootNode = "ChangePurchaseOrder_V01_00_00";
            }

            XmlNode xPriceNode = poFile.SelectSingleNode("/ns0:" + RootNode + "/DataArea/PurchaseOrder/Header/ns0:Price/ns0:Amount", namespaceManager);
            lblPOTotalPrice.Text = xPriceNode == null ? "" : xPriceNode.InnerText;
            XmlNodeList PartiesNodeList = poFile.SelectNodes("/ns0:" + RootNode + "/DataArea/PurchaseOrder/Header/ns0:Parties", namespaceManager);


            foreach (XmlNode xnd in PartiesNodeList)
            {
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "SAPVendor")
                {
                    XmlNode xSAPVendorNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    lblSAPVendorNumber.Text = xSAPVendorNode == null ? "" : xSAPVendorNode.InnerText;
                    lblSAPVendorNumber.Text = objBC.GetPartnerName(lblSAPVendorNumber.Text);
                }
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Contract Manufacturer")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    lblCM.Text = xCMNode == null ? "" : xCMNode.InnerText;
                    lblCM.Text = objBC.GetPartnerName(lblCM.Text);
                }
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "ShipTo")
                {
                    XmlNode xNameNode = xnd.SelectSingleNode("ns0:ContactInformation/ns0:Name", namespaceManager);
                    lblShipToName.Text = xNameNode == null ? "" : xNameNode.InnerText;
                    XmlNode xPhoneNode = xnd.SelectSingleNode("ns0:ContactInformation/ns0:Phone", namespaceManager);
                    lblShipToPhone.Text = xPhoneNode == null ? "" : xPhoneNode.InnerText;
                    XmlNode xPartnerNameNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    lblShipToPartnername.Text = xPartnerNameNode == null ? "" : xPartnerNameNode.InnerText;
                    lblShipToPartnername.Text = objBC.GetPartnerName(lblShipToPartnername.Text);
                    XmlNode xAddressLine1Node = xnd.SelectSingleNode("ns0:PhysicalAddress/ns0:AddressLine1", namespaceManager);
                    lblShipToAddressLine1.Text = xAddressLine1Node == null ? "" : xAddressLine1Node.InnerText;
                    XmlNode xCityNode = xnd.SelectSingleNode("ns0:PhysicalAddress/ns0:City", namespaceManager);
                    lblShipToCity.Text = xCityNode == null ? "" : xCityNode.InnerText;
                    XmlNode xCountryNode = xnd.SelectSingleNode("ns0:PhysicalAddress/ns0:Country", namespaceManager);
                    lblShipToCountry.Text = xCountryNode == null ? "" : xCountryNode.InnerText;
                    XmlNode xZipNode = xnd.SelectSingleNode("ns0:PhysicalAddress/ns0:Zip", namespaceManager);
                    lblShipToZIP.Text = xZipNode == null ? "" : xZipNode.InnerText;
                    XmlNode xStateNode = xnd.SelectSingleNode("ns0:PhysicalAddress/ns0:State", namespaceManager);
                    lblShipToState.Text = xStateNode == null ? "" : xStateNode.InnerText;
                }
            }

            XmlNode xPOTypeNode = poFile.SelectSingleNode("/ns0:" + RootNode + "/DataArea/PurchaseOrder/Header/Application/SAP/ns0:PurchaseOrderType", namespaceManager);
            lblSAPPOType.Text = xPOTypeNode == null ? "" : xPOTypeNode.InnerText;

            BindPOLines(poFile, namespaceManager, RootNode);
            GenericCollection <PurchaseOrderHistoryBE> POHistryList = new GenericCollection <PurchaseOrderHistoryBE>();
            POHistryList = objBC.BindPOHistory(PoNumber);
            Session["POHistoryCollection"] = POHistryList;
            databind();
            this.ViewState["vs"] = 0;
            databindPOHistory();
            this.ViewState["vsHistory"] = 0;

            trPODetails.Visible = true;
        }
        catch (Exception Ex)
        {
            lblSearchError.Text    = Ex.Message;
            lblSearchError.Visible = true;
            logFile.ErrorLogging(Ex);
            trPODetails.Visible = false;
        }
    }
Exemplo n.º 8
0
    protected void gvPurchaseOrder_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "ViewDetails")
            {
                ImageButton lb          = (ImageButton)e.CommandSource;
                GridViewRow gvr         = (GridViewRow)lb.NamingContainer;
                GridView    gridview    = gvr.NamingContainer as GridView;
                int         index       = Convert.ToInt32(e.CommandArgument);
                GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];

                Label lblPoNumber    = (Label)selectedRow.FindControl("lblPoNumber");
                Label lblArchivePath = (Label)selectedRow.FindControl("lblArchivePath");
                Label lblMessageType = (Label)selectedRow.FindControl("lblMessageType");

                LoadPODetails(lblPoNumber.Text, lblArchivePath.Text, lblMessageType.Text);
            }
            if (e.CommandName == "ViewFiles")
            {
                ImageButton lb          = (ImageButton)e.CommandSource;
                GridViewRow gvr         = (GridViewRow)lb.NamingContainer;
                GridView    gridview    = gvr.NamingContainer as GridView;
                int         index       = Convert.ToInt32(e.CommandArgument);
                GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];

                Label lblCorpnetStatus = (Label)selectedRow.FindControl("lblCorpnetStatus");
                Label lblExtStatus     = (Label)selectedRow.FindControl("lblExtStatus");
                Label LabelTxnType     = (Label)selectedRow.FindControl("LabelTxnType");
                Label lblTransactioID  = (Label)selectedRow.FindControl("lblTransactioID");
                Label lblPoNumber      = (Label)selectedRow.FindControl("lblPoNumber");
                Label lblTxnDate       = (Label)selectedRow.FindControl("lblTxnDate");
                Label lblPartner       = (Label)selectedRow.FindControl("lblPartner");
                Label lblICOE          = (Label)selectedRow.FindControl("lblICOE");
                Label lblArchivePath   = (Label)selectedRow.FindControl("lblArchivePath");
                Label LabelPOCBODRcvd  = (Label)selectedRow.FindControl("LabelPOCBODRcvd");

                LoadPOFiles(lblArchivePath.Text, lblTransactioID.Text, lblCorpnetStatus.Text, lblExtStatus.Text, LabelTxnType.Text, lblPoNumber.Text, lblTxnDate.Text, lblPartner.Text, lblICOE.Text, LabelPOCBODRcvd.Text);
            }
            if (e.CommandName == "ViewError")
            {
                ImageButton lb          = (ImageButton)e.CommandSource;
                GridViewRow gvr         = (GridViewRow)lb.NamingContainer;
                GridView    gridview    = gvr.NamingContainer as GridView;
                int         index       = Convert.ToInt32(e.CommandArgument);
                GridViewRow selectedRow = gridview.Rows[index - (gridview.PageIndex * gridview.PageSize)];

                Label lblTransactioID = (Label)selectedRow.FindControl("lblTransactioID");
                Label lblPoNumber     = (Label)selectedRow.FindControl("lblPoNumber");
                Label LabelTxnType    = (Label)selectedRow.FindControl("LabelTxnType");

                PurchaseOrderBC objBC        = new PurchaseOrderBC();
                string          Error        = objBC.LoadPOErrorMessage(lblTransactioID.Text, lb.ID == "imgExtStatus" ? "Extranet" : "Corpnet");
                string          PoNumber     = " PO Number : " + lblPoNumber.Text + " \\n Transaction Type : " + LabelTxnType.Text + " \\n Error Details : \\n ";
                string          errormessage = "Error Number : " + Error.Split(',')[0] + " \\n Error Description : \\n " + Error.Split(',')[1];
                //Label LabelTxnType = (Label)selectedRow.FindControl("LabelTxnType");
                string Eror = "My Error";
                //ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowMessage();", true);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Registering", "$(document).ready(function(){ ShowMessage('" + lblPoNumber.Text + "','" + LabelTxnType.Text + "','" + Error.Split(',')[0] + "','" + Error.Split(',')[1] + "'); });", true);
            }
        }
        catch (Exception ex)
        {
        }
    }
Exemplo n.º 9
0
    private void BindPurchaseOrder()
    {
        PurchaseOrderBC objBC = new PurchaseOrderBC();

        try
        {
            trPODetails.Visible = false;
            DateTime?DateFrom = txtDateFrom.Text == "" ? Convert.ToDateTime("1/1/1990") : Convert.ToDateTime(txtDateFrom.Text);
            DateTime?DateTo   = txtDateFrom.Text == "" ? Convert.ToDateTime("12/31/2050") : Convert.ToDateTime(txtDateTo.Text);
            trPODetails.Visible = false;
            GenericCollection <PurchaseOrderBE> listOfBE = objBC.GetIndividualPODetails(txtPONumber.Text, drdTxnType.SelectedValue, DateFrom, DateTo, drdServiceComponentPartnerSearch.SelectedValue);

            GenericCollection <PurchaseOrderBE> FinalList = new GenericCollection <PurchaseOrderBE>();


            string ExtranetPartners = ConfigurationSettings.AppSettings["ExtranetCMS"];

            foreach (PurchaseOrderBE objBE in listOfBE)
            {
                if (ExtranetPartners.Contains(objBE.CM))
                {
                    objBE.isICOEPartner = "NO";
                }
                else
                {
                    objBE.isICOEPartner = "YES";
                }
            }

            if (drdISOEorExtranet.SelectedIndex == 1)
            {
                int i = 0;
                foreach (PurchaseOrderBE obj1 in listOfBE)
                {
                    if (obj1.isICOEPartner == "YES")
                    {
                        FinalList.Add(i, obj1);
                    }
                }
                listOfBE = FinalList;
            }

            if (drdISOEorExtranet.SelectedIndex == 2)
            {
                int i = 0;
                foreach (PurchaseOrderBE obj1 in listOfBE)
                {
                    if (obj1.isICOEPartner == "NO")
                    {
                        FinalList.Add(i, obj1);
                    }
                }
                listOfBE = FinalList;
            }


            if (drdISOEorExtranet.SelectedIndex != 1)
            {
                listOfBE = ModifyExtranetPODetails(listOfBE);
            }


            if (drdPOStatus.SelectedIndex == 1)
            {
                int j = 0;
                for (int i = 0; i < listOfBE.Count; i++)
                {
                    if (listOfBE[i].isICOEPartner == "NO" && listOfBE[i].ExtranetStatus.ToLower() == "success")
                    {
                        FinalList.Add(j, listOfBE[i]);
                        j++;
                    }
                    if (listOfBE[i].isICOEPartner == "YES" && listOfBE[i].CorpnetStatus.ToLower() == "success")
                    {
                        FinalList.Add(j, listOfBE[i]);
                        j++;
                    }
                }
                listOfBE = FinalList;
            }

            if (drdPOStatus.SelectedIndex == 2)
            {
                int j = 0;
                for (int i = 0; i < listOfBE.Count; i++)
                {
                    if (listOfBE[i].isICOEPartner == "NO" && listOfBE[i].ExtranetStatus.ToLower() == "failed")
                    {
                        FinalList.Add(j, listOfBE[i]);
                        j++;
                    }
                    if (listOfBE[i].isICOEPartner == "YES" && listOfBE[i].CorpnetStatus.ToLower() == "failed")
                    {
                        FinalList.Add(j, listOfBE[i]);
                        j++;
                    }
                }
                listOfBE = FinalList;
            }

            if (drdPOStatus.SelectedIndex == 3)
            {
                for (int i = 0; i < listOfBE.Count; i++)
                {
                    if (listOfBE[i].isICOEPartner == "NO" && (listOfBE[i].ExtranetStatus.ToLower() == "failed" || listOfBE[i].ExtranetStatus.ToLower() == "na"))
                    {
                        FinalList.Add(i, listOfBE[i]);
                    }
                }
                listOfBE = FinalList;
            }


            //listOfBE = GetASNStatus(listOfBE);


            if (ViewState[grdPageSize] != null)
            {
                gvPurchaseOrder.PageSize = Convert.ToInt32(ViewState[grdPageSize].ToString());
            }
            else
            {
                gvPurchaseOrder.PageSize = 10;
            }


            lblRec.Text             = Utils.GridRecDispMsg(gvPurchaseOrder.PageIndex, gvPurchaseOrder.PageSize, listOfBE.Count);
            gvPurchaseOrder.Visible = true;
            if (listOfBE != null && listOfBE.Count > 0)
            {
                rowPage.Visible = true;
                rowGrid.Visible = true;

                gvPurchaseOrder.DataSource = listOfBE;
                gvPurchaseOrder.DataBind();
                lblRec.Text             = Utils.GridRecDispMsg(gvPurchaseOrder.PageIndex, gvPurchaseOrder.PageSize, listOfBE.Count);
                gvPurchaseOrder.Visible = true;
                lblRec.Visible          = true;
            }
            else
            {
                lblRec.Visible  = false;
                rowGrid.Visible = false;
                rowPage.Visible = false;


                gvPurchaseOrder.Visible    = false;
                gvPurchaseOrder.DataSource = null;
                gvPurchaseOrder.DataBind();
                lblSearchError.Text    = "No records found.";
                lblSearchError.Visible = true;
            }
            Session[vPOList] = listOfBE;
        }
        catch (Exception ex)
        {
            lblSearchError.Text    = ex.Message;
            lblSearchError.Visible = true;
            logFile.ErrorLogging(ex);
        }
    }
Exemplo n.º 10
0
    private GenericCollection <ASNHeaderBE> PrepareASNList(GenericCollection <ASNHeaderBE> listOfBE)
    {
        TransactionBC   objTranBC = new TransactionBC();
        PurchaseOrderBC objBC     = new PurchaseOrderBC();
        GenericCollection <ASNHeaderBE> ASNList = new GenericCollection <ASNHeaderBE>();

        for (int i = 0; i < listOfBE.Count; i++)
        {
            ASNHeaderBE objBE = new ASNHeaderBE();
            objBE.SNo     = i;
            objBE.TxnType = "3B2";
            objBE.TxnDate = listOfBE[i].TxnDate;
            //string File = listOfBE[0].ArchiveFile;
            XmlDocument ASNFile = new XmlDocument();
            //ASNFile.Load(@"D:\BPM\SampleFiles\ASNEGLFiles.xml");
            ASNFile.Load(listOfBE[i].ArchiveFile);
            objBE.ArchiveFile = listOfBE[i].ArchiveFile;
            XmlNamespaceManager namespaceManager = new XmlNamespaceManager(ASNFile.NameTable);
            namespaceManager.AddNamespace("ns0", "http://MS.IT.Ops.HED.ShowShipment_V02_00_00");

            XmlNode xPartnerNode = ASNFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/ApplicationArea/Sender/ns0:LogicalId", namespaceManager);
            objBE.CM = xPartnerNode == null ? "" : objBC.GetPartnerName(xPartnerNode.InnerText);
            objBE.CM = objBE.CM == "" ? xPartnerNode.InnerText : objBE.CM;

            XmlNode xASTransactionID = ASNFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/ApplicationArea/ns0:ReferenceId", namespaceManager);
            objBE.ASFeedTxnID = xASTransactionID == null ? "" : xASTransactionID.InnerText;

            XmlNode xReceiverKey = ASNFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/routing/ReceiverKey", namespaceManager);
            objBE.ReceiverKey = xReceiverKey == null ? "" : xReceiverKey.InnerText;

            XmlNode xShipDate = ASNFile.SelectSingleNode("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/TransportationEvent/ns0:DateTime", namespaceManager);
            if (xShipDate != null)
            {
                try
                {
                    objBE.ShipDate = Convert.ToDateTime(xShipDate.InnerText.Substring(0, 4) + "-" + xShipDate.InnerText.Substring(4, 2) + "-" + xShipDate.InnerText.Substring(6, 2));
                }
                catch (Exception ex)
                {
                }
            }

            XmlNodeList PartiesNodeList        = ASNFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/Parties", namespaceManager);
            XmlNodeList TrackingReferenceNodes = ASNFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/Header/TrackingReference", namespaceManager);
            XmlNodeList LineItemNodes          = ASNFile.SelectNodes("ns0:ShowShipment_V02_00_00/DataArea/Shipment/LineItem", namespaceManager);

            if (LineItemNodes != null)
            {
                objBE.LineCount = LineItemNodes.Count;
            }


            foreach (XmlNode xnd in PartiesNodeList)
            {
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Originating Party")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    objBE.OriginationParty = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
                    objBE.OriginationParty = objBE.OriginationParty == "" ? xCMNode.InnerText : objBE.OriginationParty;
                }
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Selling Partner")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    objBE.SellingPartner = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
                    objBE.SellingPartner = objBE.SellingPartner == "" ? xCMNode.InnerText : objBE.SellingPartner;
                }
                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Ship To")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    objBE.SAPShipTo = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
                    objBE.SAPShipTo = objBE.SAPShipTo == "" ? xCMNode.InnerText : objBE.SAPShipTo;
                }

                if (xnd.SelectSingleNode("ns0:PartyTypeCode", namespaceManager).InnerText == "Freight Forwarder")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:PartyIdentifier", namespaceManager);
                    objBE.FMV = xCMNode == null ? "" : objBC.GetPartnerName(xCMNode.InnerText);
                    objBE.FMV = objBE.FMV == "" ? xCMNode.InnerText : objBE.FMV;
                }
            }
            foreach (XmlNode xnd in TrackingReferenceNodes)
            {
                if (xnd.SelectSingleNode("ns0:TrackingCode", namespaceManager).InnerText == "Load Identifier")
                {
                    XmlNode xCMNode = xnd.SelectSingleNode("ns0:TrackingId", namespaceManager);
                    objBE.LoadID = xCMNode == null ? "" : xCMNode.InnerText.Substring(0, xCMNode.InnerText.Length - 2);
                }
            }
            GenericCollection <ASNLinesBE> objLinesList = new GenericCollection <ASNLinesBE>();
            int j = 0;
            foreach (XmlNode xnd in LineItemNodes)
            {
                ASNLinesBE  objLineBE       = new ASNLinesBE();
                XmlNodeList LineDocRefNodes = ASNFile.SelectNodes("/ns0:ShowShipment_V02_00_00/DataArea/Shipment/LineItem/DocumentReference", namespaceManager);
                foreach (XmlNode xndDoc in LineDocRefNodes)
                {
                    if (xndDoc.SelectSingleNode("ns0:DocumentTypeCode", namespaceManager).InnerText == "Packing Slip Number")
                    {
                        XmlNode xCMNode = xndDoc.SelectSingleNode("ns0:Id", namespaceManager);
                        objLineBE.PackSlipNumber = xPartnerNode == null ? "" : xCMNode.InnerText;
                    }
                    if (xndDoc.SelectSingleNode("ns0:DocumentTypeCode", namespaceManager).InnerText == "Purchase Order")
                    {
                        XmlNode xCMNode = xndDoc.SelectSingleNode("ns0:Id", namespaceManager);
                        objLineBE.PONumber = xPartnerNode == null ? "" : xCMNode.InnerText;
                        XmlNode xLineNumber = xndDoc.SelectSingleNode("ns0:LineNumber", namespaceManager);
                        objLineBE.LineNumber = xLineNumber == null ? "" : xLineNumber.InnerText;
                    }
                }
                XmlNode xSKUNode = xnd.SelectSingleNode("OrderItem/ns0:ProductIdentifier", namespaceManager);
                objLineBE.SKU = xSKUNode == null ? "" : xSKUNode.InnerText;
                XmlNode xUnitsShippedNode = xnd.SelectSingleNode("ns0:UnitsShipped", namespaceManager);
                objLineBE.ItemQuantity = xUnitsShippedNode == null ? "" : xUnitsShippedNode.InnerText;
                objLinesList.Add(j, objLineBE);
                j++;
            }
            objBE.ASNLines = objLinesList;
            if (objBE.LineCount == 1 && objLinesList != null)
            {
                objBE.PONumber = objLinesList[0].PONumber;
            }
            else
            {
                objBE.PONumber = "See Details";
            }
            ASNList.Add(i, objBE);
        }
        return(ASNList);
    }
Exemplo n.º 11
0
    private void BindShowShipment()
    {
        TransactionBC   objBC    = new TransactionBC();
        PurchaseOrderBC objPucBC = new PurchaseOrderBC();

        try
        {
            DateTime?DateFrom = txtDateFrom.Text == "" ? Convert.ToDateTime("1/1/1990") : Convert.ToDateTime(txtDateFrom.Text);
            DateTime?DateTo   = txtDateTo.Text == "" ? Convert.ToDateTime("12/31/2050") : Convert.ToDateTime(txtDateTo.Text);

            TimeSpan?duration = null;

            // Assign values to a and b...

            if (DateFrom.HasValue && DateTo.HasValue)
            {
                duration = DateTo.Value - DateFrom.Value;
            }

            double days = duration.GetValueOrDefault().TotalDays;

            if (days > 2 && txtDO.Text.Trim() == "")
            {
                lblSearchError.Text    = "Please select 2 Days difference between dates due to high volume of data or Provide DO Number to Search";
                lblSearchError.Visible = true;
                return;
            }

            GenericCollection <ShowShipmentBE> listOfBE = objBC.GetShowShipment945Details("Get", TxtIDOC.Text.Trim(), txtDO.Text.Trim(), txtLoadID.Text.Trim(), drdStatus.SelectedValue, drdTxnType.SelectedValue, drdServiceComponentPartnerSearch.SelectedValue, txtPlant.Text.Trim(), txtOrderType.Text.Trim(), DateFrom, DateTo);

            foreach (ShowShipmentBE objExt1 in listOfBE)
            {
                if (objExt1.StageName == "SentPositive997ToPartner")
                {
                    objExt1.Ack997Status = "pos997";
                }
                if (objExt1.StageName == "SentNegative997ToPartner")
                {
                    objExt1.Ack997Status = "neg997";
                }
                if (objExt1.StageName == "SentPositiveEDI824ToPartner")
                {
                    objExt1.Ack824Status = "pos824";
                }
                if (objExt1.StageName == "SentNegativeEDI824ToPartner")
                {
                    objExt1.Ack824Status = "Neg824";
                }
                if (objExt1.StageName == "SendPositiveEDI824for945ToBatchPrimaryTransport")
                {
                    objExt1.Ack824Status = "Pos824Batch";
                }
                if (objExt1.StageName == "SendNegativeEDI824for945ToBatchPrimaryTransport")
                {
                    objExt1.Ack824Status = "Neg824Batch";
                }
                if (objExt1.StageName == "SendNegativeEDI824for945ToBatchSecondaryTransport")
                {
                    objExt1.Ack824Status = "Neg824Batch";
                }
                if (objExt1.StageName == "SendPositiveEDI824for945ToBatchSecondaryTransport")
                {
                    objExt1.Ack824Status = "Pos824Batch";
                }
                if (objExt1.StageName == "AperakAckSentToPartner")
                {
                    objExt1.AckAperakStatus = "posAperak";
                }
                if (objExt1.StageName == "AperakNAckSentToPartner")
                {
                    objExt1.AckAperakStatus = "negAperak";
                }
                if (objExt1.MDNStatus == "RcvdPositiveMDNFromPartner")
                {
                    objExt1.MDNStatus = "PosMDN";
                }
                if (objExt1.MDNStatus == "Error_RcvdNegativeMDNFromPartnerEx")
                {
                    objExt1.MDNStatus = "NegMDN";
                }
                if (objExt1.MDNStatus == "Error_MDNNotReceivedFromPartner")
                {
                    objExt1.MDNStatus = "NoMDN";
                }
            }

            foreach (ShowShipmentBE obj in listOfBE)
            {
                string PartnerName = objPucBC.GetPartnerName(obj.Plant);
                obj.CM = PartnerName == "" ? obj.CM : PartnerName;
            }

            Session[vSSList] = listOfBE;



            if (ViewState[grdPageSize] != null)
            {
                gvDO.PageSize = Convert.ToInt32(ViewState[grdPageSize].ToString());
            }
            else
            {
                gvDO.PageSize = 10;
            }


            lblRec.Text  = Utils.GridRecDispMsg(gvDO.PageIndex, gvDO.PageSize, listOfBE.Count);
            gvDO.Visible = true;
            if (listOfBE != null && listOfBE.Count > 0)
            {
                rowPage.Visible = true;
                rowGrid.Visible = true;

                gvDO.DataSource = listOfBE;
                gvDO.DataBind();
                lblRec.Text    = Utils.GridRecDispMsg(gvDO.PageIndex, gvDO.PageSize, listOfBE.Count);
                gvDO.Visible   = true;
                lblRec.Visible = true;
            }
            else
            {
                lblRec.Visible  = false;
                rowGrid.Visible = false;
                rowPage.Visible = false;


                gvDO.Visible    = false;
                gvDO.DataSource = null;
                gvDO.DataBind();
                lblSearchError.Text    = "No records found.";
                lblSearchError.Visible = true;
            }
        }
        catch (Exception ex)
        {
            lblSearchError.Text    = ex.Message;
            lblSearchError.Visible = true;
            logFile.ErrorLogging(ex);
        }
    }