示例#1
0
    void DataBinder()
    {
        txtContainer.Focus(true);

        DataFactory dal = new DataFactory();
        DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_Container_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "List").Append("oc_ROWID", hidID.Text)
            .Append("oc_ToHBL", Request["HBL"])
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            string temphawb  = ds.Tables[0].Rows[0]["HBL"].ToString().ToUpper() == "" ? "" : "HBL# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["HBL"].ToString().ToUpper() + "</span>";
            string tempmawb  = ds.Tables[0].Rows[0]["MBL"].ToString().ToUpper() == "" ? "" : "MBL# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["MBL"].ToString().ToUpper() + "</span>";
            string tempLotNo = ds.Tables[0].Rows[0]["LotNo"].ToString().ToUpper() == "" ? "" : "Lot# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["LotNo"].ToString().ToUpper() + "</span>";
            labHeader.Html = (temphawb == "" ? "" : "<span style='padding-left:10px'>" + temphawb + "</span>") + (tempmawb == "" ? "" : "<span style='padding-left:10px'>" + tempmawb + "</span>") + (tempLotNo == "" ? "" : "<span style='padding-left:10px'>" + tempLotNo + "</span>");

            chkIsMain.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["oc_isMain"]);
            txtContainer.Text = ds.Tables[0].Rows[0]["oc_CtnrNo"].ToString();
            txtSeal.Text      = ds.Tables[0].Rows[0]["oc_SealNo"].ToString();
            CmbSize.setValue(ds.Tables[0].Rows[0]["oc_CtnrSize"].ToString());
            CmbSerMode.setValue(ds.Tables[0].Rows[0]["oc_Servicemode"].ToString());
            txtSO.Text = ds.Tables[0].Rows[0]["oc_SONo"].ToString();
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["oc_GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["oc_GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["oc_CBM"].ToString()))
            {
                txtCBM.Text = ds.Tables[0].Rows[0]["oc_CBM"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["oc_Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["oc_Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["oc_Unit"].ToString());
            txtMarks1.Text = ds.Tables[0].Rows[0]["oc_OrderMarks"].ToString();
            txtMarks2.Text = ds.Tables[0].Rows[0]["oc_OrderDescription"].ToString();
            txtmarks3.Text = ds.Tables[0].Rows[0]["oc_OrderNoOfPackage"].ToString();
            lblPiece.Text  = txtPiece.Text;
            //lblUnit.Text = ds.Tables[0].Rows[0]["oc_Unit"].ToString();
            X.AddScript("var r = StoreUnit.getById($('#CmbUnit').val());if(!Ext.isEmpty(r)){#{lblUnit}.setValue(r.data.short);}");
            txtRemark.Text = ds.Tables[0].Rows[0]["oc_Remark"].ToString();
            if (string.IsNullOrEmpty(Request["ID"]))
            {
                ControlBinder.pageTitleMsg(false, "OE-C  New", "<p>Status: New Blank Container .</p>", div_bottom);
            }
            else
            {
                ControlBinder.pageTitleMsg(false, "OE-C:" + txtContainer.Text, "<p>Status: Edit Container of  <span>" + txtContainer.Text.ToUpper() + "</span>.</p>", div_bottom);
            }
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "OE-C  New", "<p>Status: New Blank Container .</p>", div_bottom);
        }
    }
    private void ClearControls()
    {
        txtHawb.Text = "";
        CmbService.setValue("");
        CmbPPD.SelectedItem.Value = "";
        CmbSalesman.setValue("");

        txtColoader.Text  = "";
        txtReference.Text = "";
        txtClearance.Text = "";
        txtDO.Text        = "";

        CmbReceipt.setValue("");
        CmbFinalDest.setValue("");
        chkInsurance.Checked = false;
        chkDG.Checked        = false;
        chkSurrender.Checked = false;

        CmbShipperCode.setValue("");
        //CmbShipperName.SelectedItem.Value = "";
        CmbConsignee.setValue("");
        //CmbConsigneeName.SelectedItem.Value = "";

        CmbNotify1.setValue("");
        //mbNotify1Name.SelectedItem.Value = "";
        CmbNotify2.setValue("");
        //CmbNotify2Name.SelectedItem.Value = "";

        CmbCoLoader.setValue("");
        //CmbCoLoaderName.SelectedItem.Value = "";
        CmbBroker.setValue("");
        //CmbBrokerName.SelectedItem.Value = "";

        txtGWT.Text   = "";
        txtCWT.Text   = "";
        txtCBM.Text   = "";
        txtPiece.Text = "";
        CmbUnit.setValue("");
        txtContainer.Text = "";

        CmbWarehouse.setValue("");
        //CmbWarehouseName.SelectedItem.Value = "";
        txtFreeStorageStart.Text = "";
        txtFreeStorageEnd.Text   = "";
        txtPickUp.Text           = "";

        //CmbCompany.Text = "";
        // CmbCompanyName.Text = "";
        //CmbCurrency.Text = "";

        txtRemark.Text = "";
    }
示例#3
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            if (!IsPostBack)
            {
                CmbUnit.setValue("PKG");

                ComboBoxBinding();
                DataBinder();
                LockControl();
            }
        }
    }
示例#4
0
    /// <summary>
    /// 控件初始化
    /// </summary>
    #region   ComboBoxBinder()    Author :Micro   (2011-09-06)
    void ControlsInit()
    {
        txtMawb.Focus(true);

        labLotNo.Text       = "";
        labAeLotNo.Text     = "";
        txtMawb.Text        = "";
        txtReference.Text   = "";
        txtClearence.Text   = "";
        CmbCarrierCode.Text = "";
        //CmbCarrierText.Value = "";
        CmbShipperCode.Text = "";
        //CmbShipperText.Value = "";
        CmbConsigneeCode.Text = "";
        //CmbConsigneeText.Value = "";
        CmbNotify1Code.Text = "";
        //CmbNotify1Text.Value = "";
        CmbNotify2Code.Text = "";
        //CmbNotify2Text.Value = "";
        CmbDischargeCode.Text = "";
        //CmbDischargeText.Value = "";
        CmbSalesman.Text  = "";
        chbDirect.Checked = false;
        txtGWT.Text       = "";
        txtVWT.Text       = "";
        txtCWT.Text       = "";
        txtPiece.Text     = "";
        txtPallet.Text    = "";
        //CmbUnit.Text = "";
        txtRemark.Text       = "";
        txtATA.Text          = "";
        txtATD.Text          = "";
        txtETA.Text          = "";
        txtETD.Text          = "";
        txtFlightRight.Text  = "";
        CmbCarrierRight.Text = "";
        CmbFromRight.setValue("");
        CmbToRight.setValue("");
        // CmbCompanyRightCode.Text = "";
        // CmbCompanyRightText.Text = "";
        //CmbCurrencyRight.Text = "";
        CmbUnit.setValue("CTN");
        //CmbUnit.Text="CTN";
        //td_sales1.Style.Value = "display:none";
        td_sales2.Style.Value = "display:none";
    }
示例#5
0
    void DataBinder()
    {
        txtContainer.Focus(true);

        DataFactory dal = new DataFactory();
        DataSet     ds  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_Container_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "List").Append("oc_ROWID", hidID.Text)
            .Append("oc_ToHBL", Request["HBL"])
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            txtContainer.Text = ds.Tables[0].Rows[0]["oc_CtnrNo"].ToString();
            txtSeal.Text      = ds.Tables[0].Rows[0]["oc_SealNo"].ToString();
            CmbSize.setValue(ds.Tables[0].Rows[0]["oc_CtnrSize"].ToString());
            CmbSerMode.setValue(ds.Tables[0].Rows[0]["oc_Servicemode"].ToString());
            txtSO.Text    = ds.Tables[0].Rows[0]["oc_SONo"].ToString();
            txtGWT.Text   = ds.Tables[0].Rows[0]["oc_GWT"].ToString();
            txtCBM.Text   = ds.Tables[0].Rows[0]["oc_CBM"].ToString();
            txtPiece.Text = ds.Tables[0].Rows[0]["oc_Piece"].ToString();
            CmbUnit.setValue(ds.Tables[0].Rows[0]["oc_Unit"].ToString());
            txtMarks1.Text = ds.Tables[0].Rows[0]["oc_OrderMarks"].ToString();
            txtMarks2.Text = ds.Tables[0].Rows[0]["oc_OrderDescription"].ToString();
            txtmarks3.Text = ds.Tables[0].Rows[0]["oc_OrderNoOfPackage"].ToString();
            lblPiece.Text  = ds.Tables[0].Rows[0]["oc_Piece"].ToString();
            lblUnit.Text   = ds.Tables[0].Rows[0]["oc_Unit"].ToString();
            txtRemark.Text = ds.Tables[0].Rows[0]["oc_Remark"].ToString();
            if (string.IsNullOrEmpty(Request["ID"]))
            {
                ControlBinder.pageTitleMsg(false, "OI-C  New", "<p>Status: New Blank Container .</p>", div_bottom);
            }
            else
            {
                ControlBinder.pageTitleMsg(false, "OI-C:" + txtContainer.Text, "<p>Status: Edit Container of  <span>" + txtContainer.Text + "</span>.</p>", div_bottom);
            }
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "OI-C  New", "<p>Status: New Blank Container .</p>", div_bottom);
        }
    }
示例#6
0
    private void DataBindList()
    {
        txtHawb.Focus(true);
        UserSheet1.seed = hidSeed.Text;

        List <IFields> Getlist = new List <IFields>();

        Getlist.Add(dal.CreateIFields().Append("Option", "List")
                    .Append("seed", hidSeed.Text)
                    .Append("air_ToMAWB", hidMAWB.Text)
                    .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12])
                    .Append("SYS", SYS)
                    );
        DataSet ds = GetDs("FW_AirImport_HAWB_SP", Getlist);

        if (ds != null && ds.Tables[0].Rows.Count > 0 && ds.Tables[0].Rows[0]["RowID"].ToString() != "")
        {
            txtHawb.Text         = ds.Tables[0].Rows[0]["HAWB"].ToString();
            txtReference.Text    = ds.Tables[0].Rows[0]["Reference"].ToString();
            txtClearance.Text    = ds.Tables[0].Rows[0]["Clearance"].ToString();
            chkInsurance.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Insurance"].ToString() == "" ? 0 : ds.Tables[0].Rows[0]["Insurance"]);
            labMAWB.Text         = ds.Tables[0].Rows[0]["MAWB"].ToString();
            labLotNo.Text        = ds.Tables[0].Rows[0]["LotNo"].ToString();
            CmbReceipt.setValue(ds.Tables[0].Rows[0]["Receipt"].ToString());
            CmbFinalDest.setValue(ds.Tables[0].Rows[0]["FinalDest"].ToString());
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"].ToString());
            chkDG.Checked        = Convert.ToBoolean(ds.Tables[0].Rows[0]["DG"].ToString() == "" ? 0 : ds.Tables[0].Rows[0]["DG"]);
            chkSurrender.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Surrender"].ToString() == "" ? 0 : ds.Tables[0].Rows[0]["Surrender"]);

            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString());
            CmbShipperCode.Text = ds.Tables[0].Rows[0]["ShipperName"].ToString();
            CmbConsignee.setValue(ds.Tables[0].Rows[0]["Consignee"].ToString());
            CmbConsignee.Text = ds.Tables[0].Rows[0]["ConsigneeName"].ToString();

            CmbNotify1.setValue(ds.Tables[0].Rows[0]["Notify1"].ToString());
            CmbNotify1.Text = ds.Tables[0].Rows[0]["Notify1Name"].ToString();
            CmbNotify2.setValue(ds.Tables[0].Rows[0]["Notify2"].ToString());
            CmbNotify2.Text = ds.Tables[0].Rows[0]["Notify2Name"].ToString();

            CmbCoLoader.setValue(ds.Tables[0].Rows[0]["Coloader"].ToString());
            CmbCoLoader.Text = ds.Tables[0].Rows[0]["ColoaderName"].ToString();
            CmbBroker.setValue(ds.Tables[0].Rows[0]["Broker"].ToString());
            CmbBroker.Text = ds.Tables[0].Rows[0]["BrokerName"].ToString();
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["VWT"].ToString()))
            {
                txtVWT.Text = ds.Tables[0].Rows[0]["VWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CWT"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["Unit"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Pallet"].ToString()))
            {
                txtPallet.Text = ds.Tables[0].Rows[0]["Pallet"].ToString();
            }

            CmbWarehouse.setValue(ds.Tables[0].Rows[0]["Warehouse"].ToString());
            CmbWarehouse.Text        = ds.Tables[0].Rows[0]["WarehouseName"].ToString();
            txtFreeStorageStart.Text = ds.Tables[0].Rows[0]["FreeStorageStart"].ToString();
            txtFreeStorageEnd.Text   = ds.Tables[0].Rows[0]["FreeStorageEnd"].ToString();
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["FreeStorage"].ToString()))
            {
                NumFreeStorage.Text = ds.Tables[0].Rows[0]["FreeStorage"].ToString();
            }
            txtPickUp.Text = ds.Tables[0].Rows[0]["PickUp"].ToString();

            txtRemark.Text = ds.Tables[0].Rows[0]["Remark"].ToString();

            if (Convert.ToBoolean(ds.Tables[0].Rows[0]["active"]))
            {
                img_void.Style.Add("display", "none");
            }
            else
            {
                img_void.Style.Add("display", "inline");
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                btnNext.Disabled   = true;
                btnVoid.Text       = "Active";
                hidVoid.Text       = "1";
            }

            GridPanelInvoice.GetStore().DataSource = ds.Tables[1];
            GridPanelInvoice.GetStore().DataBind();



            GridPanelForeign.GetStore().DataSource = ds.Tables[3];
            GridPanelForeign.GetStore().DataBind();

            GridPanelRoute.GetStore().DataSource = ds.Tables[4];
            GridPanelRoute.GetStore().DataBind();

            GridPanelContact.GetStore().DataSource = ds.Tables[5];
            GridPanelContact.GetStore().DataBind();

            ControlBinder.pageTitleMsg(false, "AI-H:" + labLotNo.Text, "<p>Status :  Edit  HAWB of  <span>" + labLotNo.Text + "</span></p>", div_bottom);
        }
        else
        {
            labMAWB.Text  = ds.Tables[0].Rows[0]["MAWB"].ToString();
            labLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();
            CmbReceipt.setValue(ds.Tables[0].Rows[0]["Receipt"].ToString());
            CmbFinalDest.setValue(ds.Tables[0].Rows[0]["FinalDest"].ToString());
            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString());
            CmbConsignee.setValue(ds.Tables[0].Rows[0]["Consignee"].ToString());
            CmbCoLoader.setValue(ds.Tables[0].Rows[0]["Coloader"].ToString());
            CmbBroker.setValue(ds.Tables[0].Rows[0]["Broker"].ToString());
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["VWT"].ToString()))
            {
                txtVWT.Text = ds.Tables[0].Rows[0]["VWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CWT"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["Unit"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Pallet"].ToString()))
            {
                txtPallet.Text = ds.Tables[0].Rows[0]["Pallet"].ToString();
            }
            ControlBinder.pageTitleMsg(false, "AI-H New", "<p>Status :  New Blank  Hawb </p>", div_bottom);
        }
    }
示例#7
0
    void DataBinder(DataTable dt)
    {
        if (dt == null || dt.Rows.Count == 0)
        {
            ControlBinder.pageTitleMsg(false, "OE-M New", "<p>Status : New Blank  MBL . </p>", div_bottom);
            return;
        }
        labImpLotNo.Text = dt.Rows[0]["LotNo"].ToString();
        string tempmawb  = dt.Rows[0]["MBL"].ToString().ToUpper() == "" ? "" : "MBL# " + "<span style='color:#ff0000;'>" + dt.Rows[0]["MBL"].ToString().ToUpper() + "</span>";
        string tempLotNo = labImpLotNo.Text == "" ? "" : "Lot# " + "<span style='color:#ff0000;'>" + labImpLotNo.Text + "</span>";

        labHeader.Html = (tempmawb == "" ? "" : "<span>" + tempmawb + "</span>") + (tempLotNo == "" ? "" : "<span style='padding-left:10px'>" + tempLotNo + "</span>");
        txtMBL.Text    = dt.Rows[0]["MBL"].ToString();
        cmbMode.setValue(dt.Rows[0]["ServiceMode"].ToString());
        CmbGroup.SelectedItem.Value = dt.Rows[0]["o_ServiceType"].ToString();
        cmbPPD.Text = dt.Rows[0]["PPD"].ToString();
        cmbSales.setValue(dt.Rows[0]["Salesman"].ToString());
        cmbCarrierCode.setValue(dt.Rows[0]["Carrier"].ToString());
        cmbCarrierCode.Text = dt.Rows[0]["CarrierName"].ToString();
        cmbShipperCode.setValue(dt.Rows[0]["Shipper"].ToString());
        cmbShipperCode.Text = dt.Rows[0]["ShipperName"].ToString();
        cmbConsigneeCode.setValue(dt.Rows[0]["Consignee"].ToString());
        cmbConsigneeCode.Text = dt.Rows[0]["ConsigneeName"].ToString();
        cmbDischargeCode.setValue(dt.Rows[0]["Coloader"].ToString());
        cmbDischargeCode.Text = dt.Rows[0]["ColoaderName"].ToString();
        CmbNotify1.setValue(dt.Rows[0]["Notify1"].ToString());
        CmbNotify1.Text = dt.Rows[0]["Notify1Name"].ToString();
        CmbNotify2.setValue(dt.Rows[0]["Notify2"].ToString());
        CmbNotify2.Text = dt.Rows[0]["Notify2Name"].ToString();
        cmbBrokerCode.setValue(dt.Rows[0]["Broker"].ToString());
        cmbBrokerCode.Text = dt.Rows[0]["BrokerName"].ToString();
        cmbVesselCode.SelectedItem.Value = dt.Rows[0]["Vessel"].ToString();
        StoreVoyage.RemoveAll();

        DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "VoyageList").
            Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
            Append("STAT", cmbVesselCode.Text)
        }).GetTable();

        StoreVoyage.DataSource = dt1;
        StoreVoyage.DataBind();
        if (dt1 != null && dt1.Rows.Count > 0)
        {
            cmbVesselText.SelectedItem.Value = dt.Rows[0]["Voyage"].ToString();
        }
        cmbLoading.setValue(dt.Rows[0]["Loading"].ToString());
        cmbPort.setValue(dt.Rows[0]["Port"].ToString());
        cmbFinalDest.setValue(dt.Rows[0]["FinalDest"].ToString());

        txtCFSClosing.Text   = dt.Rows[0]["CFS"].ToString();
        txtCYClosing.Text    = dt.Rows[0]["CY"].ToString();
        txtOnBoard.Text      = dt.Rows[0]["OnBoard"].ToString();
        txtETD.Text          = dt.Rows[0]["ETD"].ToString();
        txtETADischarge.Text = dt.Rows[0]["ETAdischarge"].ToString();
        txtETAFinal.Text     = dt.Rows[0]["ETAFinal"].ToString();
        txtATD.Text          = dt.Rows[0]["ATD"].ToString();

        #region ///pre-Carriage
        cmbpreVessel.SelectedItem.Value = dt.Rows[0]["PreVessel"].ToString();
        StorePreVoyage.RemoveAll();

        DataTable dt2 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "VoyageList").
            Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
            Append("STAT", cmbpreVessel.Text)
        }).GetTable();
        StorePreVoyage.DataSource = dt2;
        StorePreVoyage.DataBind();
        if (dt2 != null && dt2.Rows.Count > 0)
        {
            cmbpreVoyage.SelectedItem.Value = dt.Rows[0]["PreVoyage"].ToString();
        }
        txtpreonboard.Text = dt.Rows[0]["PreOnBoard"].ToString();

        #endregion

        if (!string.IsNullOrEmpty(dt.Rows[0]["GWT"].ToString()))
        {
            txtCGWT.Text = dt.Rows[0]["GWT"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["AWT"].ToString()))
        {
            txtAGWT.Text = dt.Rows[0]["AWT"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["CBM"].ToString()))
        {
            txtCCBM.Text = dt.Rows[0]["CBM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["ACBM"].ToString()))
        {
            txtACBM.Text = dt.Rows[0]["ACBM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["PKGS"].ToString()))
        {
            txtCPiece.Text = dt.Rows[0]["PKGS"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["APKGS"].ToString()))
        {
            txtAPiece.Text = dt.Rows[0]["APKGS"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["WM"].ToString()))
        {
            txtCWM.Text = dt.Rows[0]["WM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["AWM"].ToString()))
        {
            txtAWM.Text = dt.Rows[0]["AWM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["Container"].ToString()))
        {
            txtContainer.Text = dt.Rows[0]["Container"].ToString();
        }

        CmbUnit.setValue(dt.Rows[0]["Unit"].ToString());

        txtM_to.Value = dt.Rows[0]["M_to"].ToString();
        txtM_to.Text  = dt.Rows[0]["M_toName"].ToString();

        txtclpRemark.Text  = dt.Rows[0]["o_DeclareRemark"].ToString();
        txtAccRemark.Text  = dt.Rows[0]["o_AccountRemark"].ToString();
        txtMAWBRemark.Text = dt.Rows[0]["o_Remark"].ToString();

        if (ControlBinder.IsDisplayLotNo(txtETD.Text.Trim(), labImpLotNo.Text))
        {
            btnUpdateLotNo.Show();
        }
        else
        {
            btnUpdateLotNo.Hide();
        }

        if (dt.Rows[0]["Active"].ToString() == "Y")
        {
            img_void.Style.Value = "display:none";
        }
        else
        {
            img_void.Style.Value   = "display:inline";
            btnSave.Disabled       = true;
            btnCancel.Disabled     = true;
            btnPull.Disabled       = true;
            btnNewBooking.Disabled = true;
            btnAddBooking.Disabled = true;
            btnVoid.Text           = "Active";
            hidVoid.Text           = "1";
            btnUpdateLotNo.Hide();
        }

        hidSeed.Text = dt.Rows[0]["seed"].ToString();
        ControlBinder.pageTitleMsg(false, "OE-M:" + labImpLotNo.Text, "<p>Status : Edit  MBL  of   <span>" + dt.Rows[0]["LotNo"] + "</span>  </p>", div_bottom);
    }
示例#8
0
    /// <summary>
    /// 初始数据
    /// </summary>
    #region  初始数据   DataBinder()   Author:Micro  (2011-09-05)
    void DataBinder()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Other_Domestic_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "GetList").Append("tri_Seed", hidSeed.Text)
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            labLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString();
            hidLotNo.Text = ds.Tables[0].Rows[0]["tri_LotNo"].ToString();
            txtMAWB.Text  = ds.Tables[0].Rows[0]["tri_MBL"].ToString();
            txtHAWB.Text  = ds.Tables[0].Rows[0]["tri_HBL"].ToString();

            if (ds.Tables[0].Rows[0]["tri_VesselID"].ToString() == "0" || ds.Tables[0].Rows[0]["tri_VesselID"].ToString() == "")
            {
                cmbVesselCode.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Vessel"].ToString();
                cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Voyage"].ToString();
            }
            else
            {
                cmbVesselCode.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_VesselID"].ToString();
                StoreVoyage.RemoveAll();

                DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
                {
                    dal.CreateIFields().Append("Option", "VoyageList").
                    Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
                    Append("STAT", cmbVesselCode.Text)
                }).GetTable();
                StoreVoyage.DataSource = dt1;
                StoreVoyage.DataBind();
                if (ds.Tables[0].Rows[0]["tri_VoyageID"].ToString() == "0" || ds.Tables[0].Rows[0]["tri_VoyageID"].ToString() == "")
                {
                    cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_Voyage"].ToString();
                }
                else if (dt1 != null && dt1.Rows.Count > 0)
                {
                    cmbVesselText.SelectedItem.Value = ds.Tables[0].Rows[0]["tri_VoyageID"].ToString();
                }
            }


            CmbDeparture.setValue(ds.Tables[0].Rows[0]["tri_LocReceived"].ToString());
            CmbDest.setValue(ds.Tables[0].Rows[0]["tri_LocFinal"].ToString());
            txtDepartDate.Text  = ds.Tables[0].Rows[0]["tri_ETD"].ToString();
            txtDepL.Text        = ds.Tables[0].Rows[0]["tri_LocReceivedL"].ToString();
            txtDesL.Text        = ds.Tables[0].Rows[0]["tri_LocFinalL"].ToString();
            txtArrivalDate.Text = ds.Tables[0].Rows[0]["tri_ETA"].ToString();
            txtJob.Text         = ds.Tables[0].Rows[0]["tri_EReceipt"].ToString();
            txtMAWBRemark.Text  = ds.Tables[0].Rows[0]["tri_Remark"].ToString();
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["tri_Sales"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Container"].ToString()))
            {
                txtContainer.Text = ds.Tables[0].Rows[0]["tri_Container"].ToString();
            }

            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["tri_GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CBM"].ToString()))
            {
                txtCBM.Text = ds.Tables[0].Rows[0]["tri_CBM"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CWT"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["tri_CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["tri_Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["tri_Unit"].ToString());

            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["tri_Shipper"].ToString());
            CmbShipperCode1.Text     = ds.Tables[0].Rows[0]["tri_Shipper"].ToString();
            CmbShipperCode_name.Text = ds.Tables[0].Rows[0]["tri_ShipperLine"].ToString();

            CmbConsigneeCode.setValue(ds.Tables[0].Rows[0]["tri_Consignee"].ToString());
            CmbConsigneeCode1.Text     = ds.Tables[0].Rows[0]["tri_Consignee"].ToString();
            CmbConsigneeCode_name.Text = ds.Tables[0].Rows[0]["tri_ConsigneeLine"].ToString();

            CmbNotify1Code.setValue(ds.Tables[0].Rows[0]["tri_PartyA"].ToString());
            CmbNotify1Code1.Text     = ds.Tables[0].Rows[0]["tri_PartyA"].ToString();
            CmbNotify1Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyALine"].ToString();

            CmbNotify2Code.setValue(ds.Tables[0].Rows[0]["tri_PartyB"].ToString());
            CmbNotify2Code1.Text     = ds.Tables[0].Rows[0]["tri_PartyB"].ToString();
            CmbNotify2Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyBLine"].ToString();

            CmbCarrierCode.setValue(ds.Tables[0].Rows[0]["tri_Carrier"].ToString());
            CmbCarrierCode1.Text     = ds.Tables[0].Rows[0]["tri_Carrier"].ToString();
            CmbCarrierCode_name.Text = ds.Tables[0].Rows[0]["tri_CarrierLine"].ToString();

            CmbCoLoader.setValue(ds.Tables[0].Rows[0]["tri_CoLoader"].ToString());
            CmbCoLoader1.Text     = ds.Tables[0].Rows[0]["tri_CoLoader"].ToString();
            CmbCoLoader_name.Text = ds.Tables[0].Rows[0]["tri_CoLoaderLine"].ToString();


            if (ControlBinder.IsDisplayLotNo(txtJob.Text.Trim(), hidLotNo.Text))
            {
                btnUpdateLotNo.Show();
            }
            else
            {
                btnUpdateLotNo.Hide();
            }

            if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y")
            {
                img_void.Style.Value = "display:none";
            }
            else
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnNext.Disabled     = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
                btnUpdateLotNo.Hide();
            }

            gridInvoice.GetStore().DataSource = ds.Tables[1];
            gridInvoice.GetStore().DataBind();



            ControlBinder.pageTitleMsg(false, "Domestic Shipment:" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString(), "<p>Status :  Edit  Domestic Shipment  of <span>" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString() + "</span></p>", div_bottom);
        }
        else
        {
            txtJob.RawText         = DateTime.Now.ToString("dd/MM/yyyy");
            txtJob.Text            = DateTime.Now.ToString("yyyy/MM/dd");
            txtDepartDate.RawText  = DateTime.Now.ToString("dd/MM/yyyy");
            txtDepartDate.Text     = DateTime.Now.ToString("yyyy/MM/dd");
            txtArrivalDate.RawText = DateTime.Now.ToString("dd/MM/yyyy");
            txtArrivalDate.Text    = DateTime.Now.ToString("yyyy/MM/dd");
            //CmbUnit.setValue("CTN");
            ControlBinder.pageTitleMsg(false, "Domestic Shipment:New", "<p>Status :  New  Blank  Domestic Shipment </p>", div_bottom);
        }
    }
示例#9
0
    void DataBinder(DataTable dt)
    {
        CmbUnit.setValue("PKG");
        if (dt == null || dt.Rows.Count == 0)
        {
            ControlBinder.pageTitleMsg(false, "OI-M New", "<p>Status : New Blank  MBL </p>", div_bottom);
            return;
        }
        labImpLotNo.Text = dt.Rows[0]["LotNo"].ToString();
        hidLotNo.Text    = dt.Rows[0]["LotNo"].ToString();
        txtMBL.Text      = dt.Rows[0]["MBL"].ToString();
        cmbMode.setValue(dt.Rows[0]["ServiceMode"].ToString());
        cmbPPD.Text = dt.Rows[0]["PPD"].ToString();
        cmbSales.setValue(dt.Rows[0]["Salesman"].ToString());
        txtColoader.Text  = dt.Rows[0]["ColoaderMBL"].ToString();
        txtReference.Text = dt.Rows[0]["Reference"].ToString();
        txtClearance.Text = dt.Rows[0]["Clearance"].ToString();
        cmbCarrierCode.setValue(dt.Rows[0]["Carrier"].ToString());
        cmbCarrierCode.Text = dt.Rows[0]["CarrierName"].ToString();
        cmbShipperCode.setValue(dt.Rows[0]["Shipper"].ToString());
        cmbShipperCode.Text = dt.Rows[0]["ShipperName"].ToString();
        cmbConsigneeCode.setValue(dt.Rows[0]["Consignee"].ToString());
        cmbConsigneeCode.Text = dt.Rows[0]["ConsigneeName"].ToString();
        cmbDischargeCode.setValue(dt.Rows[0]["Discharge"].ToString());
        cmbDischargeCode.Text = dt.Rows[0]["DischargeName"].ToString();
        cmbBrokerCode.setValue(dt.Rows[0]["Boroker"].ToString());
        cmbBrokerCode.Text = dt.Rows[0]["BorokerName"].ToString();
        cmbVesselCode.SelectedItem.Value = dt.Rows[0]["Vessel"].ToString();
        ComList();
        cmbVesselText.SelectedItem.Value = dt.Rows[0]["Voyage"].ToString();
        X.AddScript("getVessel('" + dt.Rows[0]["Vessel"].ToString() + "','" + dt.Rows[0]["Voyage"].ToString() + "');");
        cmbLoading.setValue(dt.Rows[0]["Loading"].ToString());
        cmbPort.setValue(dt.Rows[0]["Port"].ToString());
        cmbFinalDest.setValue(dt.Rows[0]["FinalDest"].ToString());
        txtETD.Text          = dt.Rows[0]["ETD"].ToString();
        txtETADischarge.Text = dt.Rows[0]["ETAdischarge"].ToString();
        txtETAFinal.Text     = dt.Rows[0]["ETAFinal"].ToString();
        txtOELot.Text        = dt.Rows[0]["OELotNo"].ToString();
        txtATD.Text          = dt.Rows[0]["ATD"].ToString();
        txtATA.Text          = dt.Rows[0]["ATA"].ToString();
        //if (!string.IsNullOrEmpty(dt.Rows[0]["GWT"].ToString()))
        //    txtGWT.Text = dt.Rows[0]["GWT"].ToString();
        //if (!string.IsNullOrEmpty(dt.Rows[0]["CWT"].ToString()))
        //    txtCWT.Text = dt.Rows[0]["CWT"].ToString();
        //if (!string.IsNullOrEmpty(dt.Rows[0]["CBM"].ToString()))
        //    txtCBM.Text = dt.Rows[0]["CBM"].ToString();
        //if (!string.IsNullOrEmpty(dt.Rows[0]["Piece"].ToString()))
        //    txtPiece.Text = dt.Rows[0]["Piece"].ToString();

        if (!string.IsNullOrEmpty(dt.Rows[0]["GWT"].ToString()))
        {
            txtGWT.Text = dt.Rows[0]["GWT"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["AWT"].ToString()))
        {
            txtAGWT.Text = dt.Rows[0]["AWT"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["CBM"].ToString()))
        {
            txtCBM.Text = dt.Rows[0]["CBM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["ACBM"].ToString()))
        {
            txtACBM.Text = dt.Rows[0]["ACBM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["PKGS"].ToString()))
        {
            txtPiece.Text = dt.Rows[0]["PKGS"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["APKGS"].ToString()))
        {
            txtAPiece.Text = dt.Rows[0]["APKGS"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["WM"].ToString()))
        {
            txtCWT.Text = dt.Rows[0]["WM"].ToString();
        }
        if (!string.IsNullOrEmpty(dt.Rows[0]["AWM"].ToString()))
        {
            txtAWM.Text = dt.Rows[0]["AWM"].ToString();
        }

        if (!string.IsNullOrEmpty(dt.Rows[0]["Container"].ToString()))
        {
            txtContainer.Text = dt.Rows[0]["Container"].ToString();
        }

        CmbUnit.setValue(dt.Rows[0]["Unit"].ToString());
        cmbWarehouse.setValue(dt.Rows[0]["WareHouse"].ToString());
        cmbWarehouse.Text        = dt.Rows[0]["WareHouseName"].ToString();
        txtFreeStorageStart.Text = dt.Rows[0]["FreeStorageStart"].ToString();
        txtFreeStorageEnd.Text   = dt.Rows[0]["FreeStorageEnd"].ToString();
        txtPickup.Text           = dt.Rows[0]["PickUp"].ToString();
        chbDirect.Checked        = Convert.ToBoolean(dt.Rows[0]["Direct"]);
        hidSeed.Text             = dt.Rows[0]["seed"].ToString();

        txtM_to.Value = dt.Rows[0]["M_to"].ToString();
        txtM_to.Text  = dt.Rows[0]["M_toName"].ToString();

        txtMAWBRemark.Text = dt.Rows[0]["o_Remark"].ToString();
        txtAccRemark.Text  = dt.Rows[0]["o_AccountRemark"].ToString();

        if (ControlBinder.IsDisplayLotNo(txtETADischarge.Text, hidLotNo.Text))
        {
            btnUpdateLotNo.Show();
        }
        else
        {
            btnUpdateLotNo.Hide();
        }

        if (Convert.ToBoolean(dt.Rows[0]["active"]))
        {
            img_void.Style.Value = "display:none";
        }
        else
        {
            img_void.Style.Value = "display:inline";
            btnSave.Disabled     = true;
            btnCancel.Disabled   = true;
            btnNext.Disabled     = true;
            btnVoid.Text         = "Active";
            hidVoid.Text         = "1";
            X.AddScript("$('#showHBL').hide();");
            btnUpdateLotNo.Hide();
        }



        ControlBinder.pageTitleMsg(false, "OI-M:" + labImpLotNo.Text, "<p>Status : Edit  MBL  of   <span>" + dt.Rows[0]["LotNo"] + "</span>  </p>", div_bottom);
    }
    private void DataBindList()
    {
        CmbUnit.setValue("PKG");

        List <IFields> Getlist = new List <IFields>();

        Getlist.Add(dal.CreateIFields().Append("Option", "List")
                    .Append("seed", hidSeed.Text)
                    .Append("o_ToMBL", Request["MBL"])
                    .Append("STAT", FSecurityHelper.CurrentUserDataGET()[12])
                    .Append("SYS", SYS)
                    );
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_HBL_SP", Getlist).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            txtHawb.Text = ds.Tables[0].Rows[0]["HBL"].ToString();
            CmbService.setValue(ds.Tables[0].Rows[0]["ServiceMode"]);
            CmbPPD.SelectedItem.Value = ds.Tables[0].Rows[0]["PPD"].ToString();
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"]);
            labImpLotNo.Text  = ds.Tables[0].Rows[0]["LotNo"].ToString();
            txtColoader.Text  = ds.Tables[0].Rows[0]["ColoaderHBL"].ToString();
            txtReference.Text = ds.Tables[0].Rows[0]["Reference"].ToString();
            txtClearance.Text = ds.Tables[0].Rows[0]["Clearance"].ToString();
            txtDO.Text        = ds.Tables[0].Rows[0]["DO"].ToString();

            labMBL.Text = ds.Tables[0].Rows[0]["MBL"].ToString();

            CmbReceipt.setValue(ds.Tables[0].Rows[0]["Receipt"]);
            CmbFinalDest.setValue(ds.Tables[0].Rows[0]["FinalDest"].ToString());
            chkInsurance.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Insurance"]);
            chkDG.Checked        = Convert.ToBoolean(ds.Tables[0].Rows[0]["DG"]);
            chkSurrender.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["Surrender"]);

            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString());
            CmbShipperCode.Text = ds.Tables[0].Rows[0]["ShipperName"].ToString();
            CmbConsignee.setValue(ds.Tables[0].Rows[0]["Consignee"].ToString());
            CmbConsignee.Text = ds.Tables[0].Rows[0]["ConsigneeName"].ToString();

            CmbNotify1.setValue(ds.Tables[0].Rows[0]["Notify1"].ToString());
            CmbNotify1.Text = ds.Tables[0].Rows[0]["Notify1Name"].ToString();
            CmbNotify2.setValue(ds.Tables[0].Rows[0]["Notify2"].ToString());
            CmbNotify2.Text = ds.Tables[0].Rows[0]["Notify2Name"].ToString();

            CmbCoLoader.setValue(ds.Tables[0].Rows[0]["Coloader"].ToString());
            CmbCoLoader.Text = ds.Tables[0].Rows[0]["ColoaderName"].ToString();
            CmbBroker.setValue(ds.Tables[0].Rows[0]["Broker"].ToString());
            CmbBroker.Text = ds.Tables[0].Rows[0]["BrokerName"].ToString();
            //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString()))
            //    txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString();
            //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CWT"].ToString()))
            //    txtCWT.Text = ds.Tables[0].Rows[0]["CWT"].ToString();
            //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CBM"].ToString()))
            //    txtCBM.Text = ds.Tables[0].Rows[0]["CBM"].ToString();
            //if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Piece"].ToString()))
            //    txtPiece.Text = ds.Tables[0].Rows[0]["Piece"].ToString();

            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["AWT"].ToString()))
            {
                txtAGWT.Text = ds.Tables[0].Rows[0]["AWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CBM"].ToString()))
            {
                txtCBM.Text = ds.Tables[0].Rows[0]["CBM"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["ACBM"].ToString()))
            {
                txtACBM.Text = ds.Tables[0].Rows[0]["ACBM"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["PKGS"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["PKGS"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["APKGS"].ToString()))
            {
                txtAPiece.Text = ds.Tables[0].Rows[0]["APKGS"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["WM"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["WM"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["AWM"].ToString()))
            {
                txtAWM.Text = ds.Tables[0].Rows[0]["AWM"].ToString();
            }

            CmbUnit.setValue(ds.Tables[0].Rows[0]["Unit"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Container"].ToString()))
            {
                txtContainer.Text = ds.Tables[0].Rows[0]["Container"].ToString();
            }

            CmbWarehouse.setValue(ds.Tables[0].Rows[0]["Warehouse"].ToString());
            CmbWarehouse.Text        = ds.Tables[0].Rows[0]["WarehouseName"].ToString();
            txtFreeStorageStart.Text = ds.Tables[0].Rows[0]["FreeStorageStart"].ToString();
            txtFreeStorageEnd.Text   = ds.Tables[0].Rows[0]["FreeStorageEnd"].ToString();
            txtPickUp.Text           = ds.Tables[0].Rows[0]["PickUp"].ToString();

            txtRemark.Text = ds.Tables[0].Rows[0]["Remark"].ToString();

            GridPanelInvoice.GetStore().DataSource = ds.Tables[1];
            GridPanelInvoice.GetStore().DataBind();

            GridPanelContainer.GetStore().DataSource = ds.Tables[2];
            GridPanelContainer.GetStore().DataBind();
            if (ds.Tables[2].Rows.Count > 0)
            {
                double GWT = 0.000, Pieces = 0, CBM = 0.000, wm = 0.000;
                for (int i = 0; i < ds.Tables[2].Rows.Count; i++)
                {
                    GWT    += Convert.ToDouble(ds.Tables[2].Rows[i]["GWT"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["GWT"].ToString());
                    Pieces += Convert.ToDouble(ds.Tables[2].Rows[i]["PKGS"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["PKGS"].ToString());
                    CBM    += Convert.ToDouble(ds.Tables[2].Rows[i]["CBM"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["CBM"].ToString());
                    wm     += Convert.ToDouble(ds.Tables[2].Rows[i]["WM"].ToString() == "" ? "0.000" : ds.Tables[2].Rows[i]["WM"].ToString());
                }
                if (Pieces.ToString() != "0")
                {
                    txtAPiece.Text = Pieces.ToString();
                }
                if (GWT.ToString() != "0")
                {
                    txtAGWT.Text = GWT.ToString();
                }
                if (CBM.ToString() != "0")
                {
                    txtACBM.Text = CBM.ToString();
                }
                if (wm.ToString() != "0")
                {
                    txtAWM.Text = wm.ToString();
                }
            }

            if (Convert.ToBoolean(ds.Tables[0].Rows[0]["active"]))
            {
                img_void.Style.Value = "display:none";
            }
            else
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnNext.Disabled     = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
                X.AddScript("$('#showContainer').hide();");
            }

            GridPanelOther.GetStore().DataSource = ds.Tables[3];
            GridPanelOther.GetStore().DataBind();



            GridPanelForeign.GetStore().DataSource = ds.Tables[5];
            GridPanelForeign.GetStore().DataBind();

            GridPanelRoute.GetStore().DataSource = ds.Tables[6];
            GridPanelRoute.GetStore().DataBind();

            GridPanelContact.GetStore().DataSource = ds.Tables[7];
            GridPanelContact.GetStore().DataBind();
        }

        if (!string.IsNullOrEmpty(Request["seed"]))
        {
            ControlBinder.pageTitleMsg(false, "OI-H:" + labImpLotNo.Text, "<p>Status : Edit HBL of  <span>" + labImpLotNo.Text + "</span>. </p>", div_bottom);
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "OI-H New", "<p>Status : New Blank HBL . </p>", div_bottom);
        }

        txtHawb.Focus(true);
    }
示例#11
0
    /// <summary>
    /// 初始数据
    /// </summary>
    #region  初始数据   DataBinder()   Author:Micro  (2011-09-05)
    void DataBinder()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_Triangle_Air_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "GetList").Append("tri_Seed", hidSeed.Text)
        }).GetList();

        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            labLotNo.Text    = ds.Tables[0].Rows[0]["tri_LotNo"].ToString();
            hidLotNo.Text    = ds.Tables[0].Rows[0]["tri_LotNo"].ToString();
            txtMAWB.Text     = ds.Tables[0].Rows[0]["tri_MBL"].ToString();
            txtHAWB.Text     = ds.Tables[0].Rows[0]["tri_HBL"].ToString();
            txtFlightNo.Text = ds.Tables[0].Rows[0]["tri_Flight"].ToString();
            CmbDeparture.setValue(ds.Tables[0].Rows[0]["tri_LocReceived"].ToString());
            CmbDest.setValue(ds.Tables[0].Rows[0]["tri_LocFinal"].ToString());
            txtDepL.Text        = ds.Tables[0].Rows[0]["tri_LocReceivedL"].ToString();
            txtDesL.Text        = ds.Tables[0].Rows[0]["tri_LocFinalL"].ToString();
            txtDepartDate.Text  = ds.Tables[0].Rows[0]["tri_ETD"].ToString();
            txtArrivalDate.Text = ds.Tables[0].Rows[0]["tri_ETA"].ToString();
            txtJob.Text         = ds.Tables[0].Rows[0]["tri_EReceipt"].ToString();
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["tri_Sales"].ToString());
            txtMAWBRemark.Text = ds.Tables[0].Rows[0]["tri_Remark"].ToString();

            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["tri_GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_VWT"].ToString()))
            {
                txtVWT.Text = ds.Tables[0].Rows[0]["tri_VWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_CWT"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["tri_CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["tri_Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["tri_Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["tri_Unit"].ToString());

            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["tri_Shipper"].ToString());
            CmbShipperCode1.Text     = ds.Tables[0].Rows[0]["tri_Shipper"].ToString();
            CmbShipperCode_name.Text = ds.Tables[0].Rows[0]["tri_ShipperLine"].ToString();

            CmbConsigneeCode.setValue(ds.Tables[0].Rows[0]["tri_Consignee"].ToString());
            CmbConsigneeCode1.Text     = ds.Tables[0].Rows[0]["tri_Consignee"].ToString();
            CmbConsigneeCode_name.Text = ds.Tables[0].Rows[0]["tri_ConsigneeLine"].ToString();

            CmbNotify1Code.setValue(ds.Tables[0].Rows[0]["tri_PartyA"].ToString());
            CmbNotify1Code1.Text     = ds.Tables[0].Rows[0]["tri_PartyA"].ToString();
            CmbNotify1Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyALine"].ToString();

            CmbNotify2Code.setValue(ds.Tables[0].Rows[0]["tri_PartyB"].ToString());
            CmbNotify2Code1.Text     = ds.Tables[0].Rows[0]["tri_PartyB"].ToString();
            CmbNotify2Code_name.Text = ds.Tables[0].Rows[0]["tri_PartyBLine"].ToString();

            CmbCarrierCode.setValue(ds.Tables[0].Rows[0]["tri_Carrier"].ToString());
            CmbCarrierCode1.Text     = ds.Tables[0].Rows[0]["tri_Carrier"].ToString();
            CmbCarrierCode_name.Text = ds.Tables[0].Rows[0]["tri_CarrierLine"].ToString();

            CmbCoLoader.setValue(ds.Tables[0].Rows[0]["tri_CoLoader"].ToString());
            CmbCoLoader1.Text     = ds.Tables[0].Rows[0]["tri_CoLoader"].ToString();
            CmbCoLoader_name.Text = ds.Tables[0].Rows[0]["tri_CoLoaderLine"].ToString();

            if (ControlBinder.IsDisplayLotNo(txtJob.Text.Trim(), hidLotNo.Text))
            {
                btnUpdateLotNo.Show();
            }
            else
            {
                btnUpdateLotNo.Hide();
            }


            if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y")
            {
                img_void.Style.Value = "display:none";
            }
            else
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnNext.Disabled     = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
                btnUpdateLotNo.Hide();
            }

            gridInvoice.GetStore().DataSource = ds.Tables[1];
            gridInvoice.GetStore().DataBind();



            ControlBinder.pageTitleMsg(false, "Air Shipment:" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString(), "<p>Status :  Edit  Air Shipment  of <span>" + ds.Tables[0].Rows[0]["tri_LotNo"].ToString() + "</span></p>", div_bottom);
        }
        else
        {
            txtJob.RawText         = DateTime.Now.ToString("dd/MM/yyyy");
            txtJob.Text            = DateTime.Now.ToString("yyyy/MM/dd");
            txtDepartDate.RawText  = DateTime.Now.ToString("dd/MM/yyyy");
            txtDepartDate.Text     = DateTime.Now.ToString("yyyy/MM/dd");
            txtArrivalDate.RawText = DateTime.Now.ToString("dd/MM/yyyy");
            txtArrivalDate.Text    = DateTime.Now.ToString("yyyy/MM/dd");
            //CmbUnit.setValue("CTN");
            ControlBinder.pageTitleMsg(false, "Air Shipment:New", "<p>Status :  New  Blank  Air Shipment </p>", div_bottom);
        }
    }
示例#12
0
    private void DataBindList()
    {
        txtHawb.Focus(true);

        List <IFields> Getlist = new List <IFields>();

        Getlist.Add(dal.CreateIFields().Append("Option", "GetSubShipment")
                    .Append("air_Seed", hidSeed.Text == ""?null:hidSeed.Text)
                    .Append("str", hidIDList.Text)
                    .Append("air_STAT", FSecurityHelper.CurrentUserDataGET()[12])
                    .Append("air_SYS", sys)
                    );
        DataSet ds = GetDs("FW_AirExport_SubShipment_SP", Getlist);

        if (ds != null && ds.Tables[0].Rows.Count > 0 && hidSeed.Text != "0" && hidSeed.Text != "")
        {
            string tempmawb  = ds.Tables[0].Rows[0]["MAWB"].ToString().ToUpper() == "" ? "" : "MAWB# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["MAWB"].ToString().ToUpper() + "</span>";
            string tempLotNo = ds.Tables[0].Rows[0]["LotNo"].ToString().ToUpper() == "" ? "" : "Lot# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["LotNo"].ToString().ToUpper() + "</span>";
            labHeader.Html = "Book# " + "<span style='color:#ff0000;'>" + ds.Tables[0].Rows[0]["BookNo"].ToString().ToUpper() + "</span>" + (tempmawb == "" ? "" : "<span style='padding-left:10px'>" + tempmawb + "</span>") + (tempLotNo == "" ? "" : "<span style='padding-left:10px'>" + tempLotNo + "</span>");
            hidLotNo.Text  = ds.Tables[0].Rows[0]["BookNo"].ToString();


            txtHawb.Text       = ds.Tables[0].Rows[0]["HAWB"].ToString();
            txtReference.Text  = ds.Tables[0].Rows[0]["Reference"].ToString();
            chkSpecial.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["SpecicalDeal"].ToString() == "N" ? 0 : 1);
            CmbReceipt.setValue(ds.Tables[0].Rows[0]["Receipt"].ToString());
            CmbFinalDest.setValue(ds.Tables[0].Rows[0]["Destination"].ToString());
            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"].ToString());
            txtEst.Text = ds.Tables[0].Rows[0]["EstReceipt"].ToString();
            txtAct.Text = ds.Tables[0].Rows[0]["ActReceipt"].ToString();
            txtCS.Text  = ds.Tables[0].Rows[0]["air_User"].ToString();
            CmbNP.SelectedItem.Value = ds.Tables[0].Rows[0]["NP"].ToString();

            CmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString());
            CmbShipperCode.Text = ds.Tables[0].Rows[0]["ShipperName"].ToString();
            CmbConsignee.setValue(ds.Tables[0].Rows[0]["Consignee"].ToString());
            CmbConsignee.Text = ds.Tables[0].Rows[0]["ConsigneeName"].ToString();

            CmbNotify1.setValue(ds.Tables[0].Rows[0]["Notify1"].ToString());
            CmbNotify1.Text = ds.Tables[0].Rows[0]["Notify1Name"].ToString();
            CmbNotify2.setValue(ds.Tables[0].Rows[0]["Notify2"].ToString());
            CmbNotify2.Text = ds.Tables[0].Rows[0]["Notify2Name"].ToString();

            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["GWT"].ToString()))
            {
                txtGWT.Text = ds.Tables[0].Rows[0]["GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["VWT"].ToString()))
            {
                txtVWT.Text = ds.Tables[0].Rows[0]["VWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CWT"].ToString()))
            {
                txtCWT.Text = ds.Tables[0].Rows[0]["CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Piece"].ToString()))
            {
                txtPiece.Text = ds.Tables[0].Rows[0]["Piece"].ToString();
            }
            CmbUnit.setValue(ds.Tables[0].Rows[0]["Unit"].ToString());
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Pallet"].ToString()))
            {
                txtPallet.Text = ds.Tables[0].Rows[0]["Pallet"].ToString();
            }
            if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["CBF"].ToString()))
            {
                txtCbf.Text = ds.Tables[0].Rows[0]["CBF"].ToString();
            }
            bool ismakehawb = ds.Tables[0].Rows[0]["air_MakeHAWB"].ToString() == "" ? false : Convert.ToBoolean(ds.Tables[0].Rows[0]["air_MakeHAWB"]);
            if (ismakehawb == true)
            {
                txtGWT.Disabled   = true;
                txtVWT.Disabled   = true;
                txtCWT.Disabled   = true;
                txtPiece.Disabled = true;
            }
            else
            {
                txtGWT.Disabled   = false;
                txtVWT.Disabled   = false;
                txtCWT.Disabled   = false;
                txtPiece.Disabled = false;
            }

            if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y")
            {
                img_void.Style.Value = "display:none";
            }
            else
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnPull.Disabled     = true;
                btnNew.Disabled      = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
            }

            if (ds.Tables[1].Rows.Count > 0)
            {
                gpHAWB.GetStore().DataSource = ds.Tables[1];
                gpHAWB.GetStore().DataBind();
                double GWT = 0, VWT = 0, CWT = 0, Pieces = 0, Pallets = 0;
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    GWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["GWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["GWT"].ToString());
                    VWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["VWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["VWT"].ToString());
                    CWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["CWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["CWT"].ToString());
                    Pieces  += Convert.ToDouble(ds.Tables[1].Rows[i]["Piece"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["Piece"].ToString());
                    Pallets += Convert.ToDouble(ds.Tables[1].Rows[i]["Pallet"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["Pallet"].ToString());
                }
                lblGWT.Text    = GWT.ToString("0.000");
                lblVWT.Text    = VWT.ToString("0.000");
                lblCWT.Text    = CWT.ToString("0.000");
                lblPiece.Text  = Pieces.ToString();
                lblPallet.Text = Pallets.ToString();
            }



            gpInvoice.GetStore().DataSource = ds.Tables[3];
            gpInvoice.GetStore().DataBind();

            ControlBinder.pageTitleMsg(false, "AE-H:" + hidLotNo.Text, "<p>Status :  Edit  HAWB of  <span>" + hidLotNo.Text + "</span></p>", div_bottom);
        }
        else
        {
            if (ds.Tables[1].Rows.Count > 0)
            {
                gpHAWB.GetStore().DataSource = ds.Tables[1];
                gpHAWB.GetStore().DataBind();
                double GWT = 0, VWT = 0, CWT = 0, Pieces = 0, Pallets = 0;
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    GWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["GWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["GWT"].ToString());
                    VWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["VWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["VWT"].ToString());
                    CWT     += Convert.ToDouble(ds.Tables[1].Rows[i]["CWT"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["CWT"].ToString());
                    Pieces  += Convert.ToDouble(ds.Tables[1].Rows[i]["Piece"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["Piece"].ToString());
                    Pallets += Convert.ToDouble(ds.Tables[1].Rows[i]["Pallet"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["Pallet"].ToString());
                }
                lblGWT.Text    = GWT.ToString("0.000");
                lblVWT.Text    = VWT.ToString("0.000");
                lblCWT.Text    = CWT.ToString("0.000");
                lblPiece.Text  = Pieces.ToString();
                lblPallet.Text = Pallets.ToString();

                txtGWT.Text    = lblGWT.Text;
                txtVWT.Text    = lblVWT.Text;
                txtCWT.Text    = lblCWT.Text;
                txtPiece.Text  = lblPiece.Text;
                txtPallet.Text = lblPallet.Text;
            }
            ControlBinder.pageTitleMsg(false, "AE-H New", "<p>Status :  New Blank  HAWB </p>", div_bottom);
        }
    }
示例#13
0
    /// <summary>
    /// 初始数据
    /// </summary>
    #region  初始数据   DataBinder()   Author:Micro  (2011-09-05)
    void DataBinder()
    {
        DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirImport_Joblist_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "MAWBByID").Append("air_ROWID", hidRowID.Text)
        }).GetTable();

        if (dt != null && dt.Rows.Count > 0)
        {
            //hidRowID.Text = dt.Rows[0]["RowID"].ToString();
            labLotNo.Text     = dt.Rows[0]["LotNo"].ToString();
            hidLotNo.Text     = dt.Rows[0]["LotNo"].ToString();
            labAeLotNo.Text   = dt.Rows[0]["AeLotNo"].ToString();
            txtMawb.Text      = dt.Rows[0]["MAWB"].ToString();
            txtReference.Text = dt.Rows[0]["Reference"].ToString();
            txtClearence.Text = dt.Rows[0]["Clearance"].ToString();
            CmbCarrierCode.setValue(dt.Rows[0]["Coloader"].ToString());
            CmbCarrierCode.Text = dt.Rows[0]["ColoaderName"].ToString();
            CmbShipperCode.setValue(dt.Rows[0]["Shipper"].ToString());
            CmbShipperCode.Text = dt.Rows[0]["ShipperName"].ToString();
            CmbConsigneeCode.setValue(dt.Rows[0]["Consignee"].ToString());
            CmbConsigneeCode.Text = dt.Rows[0]["ConsigneeName"].ToString();
            CmbNotify1Code.setValue(dt.Rows[0]["Notify1"].ToString());
            CmbNotify1Code.Text = dt.Rows[0]["Notify1Name"].ToString();
            CmbNotify2Code.setValue(dt.Rows[0]["Notify2"].ToString());
            CmbNotify2Code.Text = dt.Rows[0]["Notify2Name"].ToString();
            CmbDischargeCode.setValue(dt.Rows[0]["Discharge"].ToString());
            CmbDischargeCode.Text = dt.Rows[0]["DischargeName"].ToString();
            chbDirect.Checked     = Convert.ToBoolean(dt.Rows[0]["Direct"].ToString());
            CmbSalesman.setValue(dt.Rows[0]["Salesman"].ToString());
            if (Convert.ToBoolean(dt.Rows[0]["Direct"].ToString()))
            {
                //td_sales1.Style.Value = "visibility:visible; width:210px;";
                td_sales2.Style.Value = "visibility:visible;width:70px;padding-left:0px;";
                X.AddScript("HawbShow(true);");
            }
            else
            {
                //td_sales1.Style.Value = "visibility:hidden;width:210px;";
                td_sales2.Style.Value = "visibility:hidden;width:70px;padding-left:0px;";
                X.AddScript("HawbShow(false);");
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["GWT"].ToString()))
            {
                txtGWT.Text = dt.Rows[0]["GWT"].ToString();
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["VWT"].ToString()))
            {
                txtVWT.Text = dt.Rows[0]["VWT"].ToString();
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["CWT"].ToString()))
            {
                txtCWT.Text = dt.Rows[0]["CWT"].ToString();
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["Piece"].ToString()))
            {
                txtPiece.Text = dt.Rows[0]["Piece"].ToString();
            }
            if (!string.IsNullOrEmpty(dt.Rows[0]["Pallet"].ToString()))
            {
                txtPallet.Text = dt.Rows[0]["Pallet"].ToString();
            }
            CmbUnit.setValue(dt.Rows[0]["Unit"].ToString());
            //CmbUnit.Text=dt.Rows[0]["Unit"].ToString();
            txtRemark.Text = dt.Rows[0]["Remark"].ToString();
            txtATA.Text    = dt.Rows[0]["ATA"].ToString();
            txtATD.Text    = dt.Rows[0]["ATD"].ToString();
            txtETA.Text    = dt.Rows[0]["ETA"].ToString();
            txtETD.Text    = dt.Rows[0]["ETD"].ToString();
            CmbCarrierRight.setValue(dt.Rows[0]["Carrier"].ToString());
            txtFlightRight.Text = dt.Rows[0]["FlightNo"].ToString();
            CmbFromRight.setValue(dt.Rows[0]["From"].ToString());
            CmbToRight.setValue(dt.Rows[0]["To"].ToString());
            //CmbFromRight.Text=dt.Rows[0]["From"].ToString();
            //CmbToRight.Text=dt.Rows[0]["To"].ToString();

            if (ControlBinder.IsDisplayLotNo(txtETA.Text, labLotNo.Text))
            {
                btnUpdateLotNo.Show();
            }
            else
            {
                btnUpdateLotNo.Hide();
            }

            txtVoid.Text = Convert.ToBoolean(dt.Rows[0]["Action"]) ? "1" : "0";
            if (txtVoid.Text == "0")
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnNext.Disabled     = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
                X.AddScript("$('#showHBL').hide();");
                btnUpdateLotNo.Hide();
            }
            else
            {
                img_void.Style.Value = "display:none";
            }



            ControlBinder.pageTitleMsg(false, "AI-M:" + dt.Rows[0]["LotNo"].ToString(), "<p>Status :  Edit  MAWB  of <span>" + dt.Rows[0]["LotNo"].ToString() + "</span></p>", div_bottom);
        }
        else
        {
            //td_sales1.Style.Value = "visibility:hidden;width:210px;";
            td_sales2.Style.Value = "visibility:hidden;width:70px;padding-left:0px;";
            X.AddScript("HawbShow(false);");
            ControlBinder.pageTitleMsg(false, "AI-M:New", "<p>Status :  New  Blank  MAWB </p>", div_bottom);
        }
    }