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 = "";
    }
Beispiel #2
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);
        }
    }
Beispiel #3
0
    private void DataBindList()
    {
        txtMAWB.Focus(true);

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

        Getlist.Add(dal.CreateIFields().Append("Option", "GetAEMakeConsol")
                    .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_ViewConsol_SP", Getlist);

        if (ds != null && ds.Tables[0].Rows.Count > 0 && hidSeed.Text != null && hidSeed.Text != "")
        {
            labLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();
            hidLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();

            txtMAWB.Text = ds.Tables[0].Rows[0]["MAWB"].ToString();
            //CmbDeparture.setValue(ds.Tables[0].Rows[0]["Departure"].ToString());
            //CmbFinalDest.setValue(ds.Tables[0].Rows[0]["Destination"].ToString());

            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"].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();
            CmbColoader.setValue(ds.Tables[0].Rows[0]["CoLoader"].ToString());
            CmbColoader.Text = ds.Tables[0].Rows[0]["CoLoaderName"].ToString();

            CmbCarrierRight.setValue(ds.Tables[0].Rows[0]["Carrier"].ToString());
            txtFlightRight.Text = ds.Tables[0].Rows[0]["FlightNo"].ToString();
            CmbFromRight.setValue(ds.Tables[0].Rows[0]["From"].ToString());
            CmbToRight.setValue(ds.Tables[0].Rows[0]["To"].ToString());
            txtETD.Text    = ds.Tables[0].Rows[0]["ETD"].ToString();
            txtETA.Text    = ds.Tables[0].Rows[0]["ETA"].ToString();
            txtATD.Text    = ds.Tables[0].Rows[0]["ATD"].ToString();
            txtATA.Text    = ds.Tables[0].Rows[0]["ATA"].ToString();
            txtRemark.Text = ds.Tables[0].Rows[0]["Remark"].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();
            }
            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]["Rate"].ToString()))
            {
                txtRate.Text = ds.Tables[0].Rows[0]["Rate"].ToString();
            }

            bool ismakeMawb = ds.Tables[0].Rows[0]["air_MakeMAWB"].ToString() == "" ? false : Convert.ToBoolean(ds.Tables[0].Rows[0]["air_MakeMAWB"]);

            string flag = "N";
            if (ismakeMawb)
            {
                flag = "Y";
            }
            X.AddScript("isMawbFlag='" + flag + "';");

            //if (ismakeMawb == true)
            //{
            //    txtGWT.Disabled = true;
            //    txtVWT.Disabled = true;
            //    txtCWT.Disabled = true;
            //    txtPiece.Disabled = true;
            //    isMawbFlag.Style.Add("display", "none");
            //}
            //else
            //{
            //    txtGWT.Disabled = false;
            //    txtVWT.Disabled = false;
            //    txtCWT.Disabled = false;
            //    txtPiece.Disabled = false;
            //    isMawbFlag.Style.Add("display", "block");
            //}
            if (ds.Tables[1].Rows.Count > 0)
            {
                GridFlightList.GetStore().DataSource = ds.Tables[1];
                GridFlightList.GetStore().DataBind();
            }

            if (ds.Tables[2].Rows.Count > 0)
            {
                gpHAWB.GetStore().DataSource = ds.Tables[2];
                gpHAWB.GetStore().DataBind();
                double GWT = 0, VWT = 0, CWT = 0, Pieces = 0, Pallets = 0;
                for (int i = 0; i < ds.Tables[2].Rows.Count; i++)
                {
                    if (ds.Tables[2].Rows[i]["IsSub"].ToString() == "0")
                    {
                        GWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["GWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["GWT"].ToString());
                        VWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["VWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["VWT"].ToString());
                        CWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["CWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["CWT"].ToString());
                        Pieces  += Convert.ToDouble(ds.Tables[2].Rows[i]["Piece"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["Piece"].ToString());
                        Pallets += Convert.ToDouble(ds.Tables[2].Rows[i]["Pallet"].ToString() == "" ? "0" : ds.Tables[2].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();
            }

            if (ds.Tables[3].Rows.Count > 0)
            {
                gpInvoice.GetStore().DataSource = ds.Tables[3];
                gpInvoice.GetStore().DataBind();
            }


            if (ControlBinder.IsDisplayLotNo(txtETD.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;
                btnPull.Disabled     = true;
                btnNew.Disabled      = true;
                btnVoid.Text         = "Active";
                hidVoid.Text         = "1";
                btnUpdateLotNo.Hide();
            }
            ControlBinder.pageTitleMsg(false, showname + ":" + hidLotNo.Text, "<p>Status :  Edit  No. of  <span>" + hidLotNo.Text + "</span></p>", div_bottom);
        }
        else
        {
            if (ds.Tables[2].Rows.Count > 0)
            {
                gpHAWB.GetStore().DataSource = ds.Tables[2];
                gpHAWB.GetStore().DataBind();
                double GWT = 0, VWT = 0, CWT = 0, Pieces = 0, Pallets = 0;
                for (int i = 0; i < ds.Tables[2].Rows.Count; i++)
                {
                    if (ds.Tables[2].Rows[i]["IsSub"].ToString() == "0")
                    {
                        GWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["GWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["GWT"].ToString());
                        VWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["VWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["VWT"].ToString());
                        CWT     += Convert.ToDouble(ds.Tables[2].Rows[i]["CWT"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["CWT"].ToString());
                        Pieces  += Convert.ToDouble(ds.Tables[2].Rows[i]["Piece"].ToString() == "" ? "0" : ds.Tables[2].Rows[i]["Piece"].ToString());
                        Pallets += Convert.ToDouble(ds.Tables[2].Rows[i]["Pallet"].ToString() == "" ? "0" : ds.Tables[2].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();
            }
            ControlBinder.pageTitleMsg(false, showname, "<p>Status :  New Blank  No. </p>", div_bottom);
        }
    }
Beispiel #4
0
    public void GetHAWBInfo(string name)
    {
        DataSet dsCom = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_Manifest_SP", new List <IFields>()
        {
            dal.CreateIFields().
            Append("Option", "GetHawbInfo").
            Append("wbm_Seed", hidSeed.Text)
        }).GetList();

        if (dsCom != null && dsCom.Tables[0].Rows.Count > 0)
        {
            if (name == "Shipper")
            {
                CmbShipperCode.setValue(dsCom.Tables[0].Rows[0]["wbi_ShipperCode"].ToString());
                lblShipper1.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper1"].ToString();
                lblShipper2.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper2"].ToString();
                lblShipper3.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper3"].ToString();
                lblShipper4.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper4"].ToString();
                lblShipper5.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper5"].ToString();
                lblShipper6.Text = dsCom.Tables[0].Rows[0]["wbi_Shipper6"].ToString();
            }
            else if (name == "Consignee")
            {
                CmbConsignee.setValue(dsCom.Tables[0].Rows[0]["wbi_ConsigneeCode"].ToString());
                lblConsignee1.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee1"].ToString();
                lblConsignee2.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee2"].ToString();
                lblConsignee3.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee3"].ToString();
                lblConsignee4.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee4"].ToString();
                lblConsignee5.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee5"].ToString();
                lblConsignee6.Text = dsCom.Tables[0].Rows[0]["wbi_Consignee6"].ToString();
            }
            else
            {
                int count = dsCom.Tables[1].Rows.Count;
                if (count > 0)
                {
                    lblNature1.Text = dsCom.Tables[1].Rows[0][0].ToString();
                }
                if (count > 1)
                {
                    lblNature2.Text = dsCom.Tables[1].Rows[1][0].ToString();
                }
                if (count > 2)
                {
                    lblNature3.Text = dsCom.Tables[1].Rows[2][0].ToString();
                }
                if (count > 3)
                {
                    lblNature4.Text = dsCom.Tables[1].Rows[3][0].ToString();
                }
                if (count > 4)
                {
                    lblNature5.Text = dsCom.Tables[1].Rows[4][0].ToString();
                }
                if (count > 5)
                {
                    lblNature6.Text = dsCom.Tables[1].Rows[5][0].ToString();
                }
            }
        }
    }
Beispiel #5
0
    private void DataBindList()
    {
        List <IFields> Getlist = new List <IFields>();

        Getlist.Add(dal.CreateIFields().Append("Option", "List")
                    .Append("wbm_Seed", hidSeed.Text == "" ? null : hidSeed.Text)
                    );
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_AirExport_Manifest_SP", Getlist).GetList();

        if (ds != null && ds.Tables[0].Rows[0][0].ToString() == "Y")
        {
            if (ds != null && ds.Tables[1].Rows.Count > 0)
            {
                txtHAWB.Text  = ds.Tables[1].Rows[0]["wbm_HAWB"].ToString();
                txtPKG.Text   = ds.Tables[1].Rows[0]["wbm_RCP"].ToString();
                txtWT.Text    = ds.Tables[1].Rows[0]["wbm_WT"].ToString();
                txtPreWT.Text = ds.Tables[1].Rows[0]["wbm_PreAlertWT"].ToString();
                txtInfo.Text  = ds.Tables[1].Rows[0]["wbm_WTLine"].ToString();
                CmbDest.SelectedItem.Value = ds.Tables[1].Rows[0]["wbm_Final"].ToString();

                CmbShipperCode.setValue(ds.Tables[1].Rows[0]["wbm_ShipperCode"].ToString());
                lblShipper1.Text = ds.Tables[1].Rows[0]["wbm_Shipper1"].ToString();
                lblShipper2.Text = ds.Tables[1].Rows[0]["wbm_Shipper2"].ToString();
                lblShipper3.Text = ds.Tables[1].Rows[0]["wbm_Shipper3"].ToString();
                lblShipper4.Text = ds.Tables[1].Rows[0]["wbm_Shipper4"].ToString();
                lblShipper5.Text = ds.Tables[1].Rows[0]["wbm_Shipper5"].ToString();
                lblShipper6.Text = ds.Tables[1].Rows[0]["wbm_Shipper6"].ToString();

                CmbConsignee.setValue(ds.Tables[1].Rows[0]["wbm_ConsigneeCode"].ToString());
                lblConsignee1.Text = ds.Tables[1].Rows[0]["wbm_Consignee1"].ToString();
                lblConsignee2.Text = ds.Tables[1].Rows[0]["wbm_Consignee2"].ToString();
                lblConsignee3.Text = ds.Tables[1].Rows[0]["wbm_Consignee3"].ToString();
                lblConsignee4.Text = ds.Tables[1].Rows[0]["wbm_Consignee4"].ToString();
                lblConsignee5.Text = ds.Tables[1].Rows[0]["wbm_Consignee5"].ToString();
                lblConsignee6.Text = ds.Tables[1].Rows[0]["wbm_Consignee6"].ToString();

                lblNature1.Text = ds.Tables[1].Rows[0]["wbm_Nature1"].ToString();
                lblNature2.Text = ds.Tables[1].Rows[0]["wbm_Nature2"].ToString();
                lblNature3.Text = ds.Tables[1].Rows[0]["wbm_Nature3"].ToString();
                lblNature4.Text = ds.Tables[1].Rows[0]["wbm_Nature4"].ToString();
                lblNature5.Text = ds.Tables[1].Rows[0]["wbm_Nature5"].ToString();
                lblNature6.Text = ds.Tables[1].Rows[0]["wbm_Nature6"].ToString();
            }

            if (ds != null && ds.Tables[2].Rows.Count > 0)
            {
                gpHawb.GetStore().DataSource = ds.Tables[2];
                gpHawb.GetStore().DataBind();
                RowSelectionModel sm = gpHawb.GetSelectionModel() as RowSelectionModel;
                sm.SelectRow(0);
                sm.SelectedRows.Add(new SelectedRow(0));
            }
        }
        else
        {
            if (ds.Tables[1].Rows.Count > 0)
            {
                txtHAWB.Text = ds.Tables[1].Rows[0]["wbm_HAWB"].ToString();
                txtPKG.Text  = ds.Tables[1].Rows[0]["wbm_RCP"].ToString();
                txtWT.Text   = ds.Tables[1].Rows[0]["wbm_WT"].ToString();
                CmbDest.SelectedItem.Value = ds.Tables[1].Rows[0]["wbm_Final"].ToString();
            }
        }
    }
Beispiel #6
0
    private void DataBindList()
    {
        txtMAWB.Focus(true);

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

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

        if (ds != null && ds.Tables[0].Rows.Count > 0 && hidSeed.Text != "0" && hidSeed.Text != "")
        {
            labLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();
            hidLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();

            txtMAWB.Text = ds.Tables[0].Rows[0]["MAWB"].ToString();
            //CmbDeparture.setValue(ds.Tables[0].Rows[0]["Departure"].ToString());
            //CmbFinalDest.setValue(ds.Tables[0].Rows[0]["Destination"].ToString());

            CmbSalesman.setValue(ds.Tables[0].Rows[0]["Salesman"].ToString());

            CmbColoader.setValue(ds.Tables[0].Rows[0]["CoLoader"].ToString());
            CmbColoader.Text = ds.Tables[0].Rows[0]["CoLoaderName"].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();
            CmbNP.SelectedItem.Value = ds.Tables[0].Rows[0]["NP"].ToString();

            CmbCarrierRight.setValue(ds.Tables[0].Rows[0]["Carrier"].ToString());
            txtFlightRight.Text = ds.Tables[0].Rows[0]["FlightNo"].ToString();
            CmbFromRight.setValue(ds.Tables[0].Rows[0]["From"].ToString());
            CmbToRight.setValue(ds.Tables[0].Rows[0]["To"].ToString());
            txtETD.Text        = ds.Tables[0].Rows[0]["ETD"].ToString();
            txtETA.Text        = ds.Tables[0].Rows[0]["ETA"].ToString();
            txtATD.Text        = ds.Tables[0].Rows[0]["ATD"].ToString();
            txtATA.Text        = ds.Tables[0].Rows[0]["ATA"].ToString();
            txtMAWBRemark.Text = ds.Tables[0].Rows[0]["air_Remark"].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();
            }
            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]["Rate"].ToString()))
            {
                txtRate.Text = ds.Tables[0].Rows[0]["Rate"].ToString();
            }

            bool ismakeMawb = ds.Tables[0].Rows[0]["air_MakeMAWB"].ToString() == "" ? false : Convert.ToBoolean(ds.Tables[0].Rows[0]["air_MakeMAWB"]);
            if (ismakeMawb == true)
            {
                txtGWT.Disabled   = true;
                txtVWT.Disabled   = true;
                txtCWT.Disabled   = true;
                txtPiece.Disabled = true;
                isMawbFlag.Style.Add("display", "none");
            }
            else
            {
                txtGWT.Disabled   = false;
                txtVWT.Disabled   = false;
                txtCWT.Disabled   = false;
                txtPiece.Disabled = false;
                isMawbFlag.Style.Add("display", "block");
            }
            if (ds.Tables[1].Rows.Count > 0)
            {
                GridFlightList.GetStore().DataSource = ds.Tables[1];
                GridFlightList.GetStore().DataBind();
            }


            if (ds.Tables[2].Rows.Count > 0)
            {
                gpInvoice.GetStore().DataSource = ds.Tables[2];
                gpInvoice.GetStore().DataBind();
            }


            if (ControlBinder.IsDisplayLotNo(txtETD.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();
            }

            ControlBinder.pageTitleMsg(false, "AE-M:" + hidLotNo.Text, "<p>Status :  Edit MAWB of  <span>" + hidLotNo.Text + "</span></p>", div_bottom);
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "AE-M New", "<p>Status :  New Blank MAWB </p>", div_bottom);
        }
    }
Beispiel #7
0
    private void DataBindList()
    {
        List <IFields> Getlist = new List <IFields>();

        Getlist.Add(dal.CreateIFields().Append("Option", "GetAEDirectMAWB")
                    .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_DirectMAWB_SP", Getlist);

        if (ds != null && ds.Tables[0].Rows.Count > 0 && hidSeed.Text != null && hidSeed.Text != "")
        {
            labLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();
            if (labLotNo.Text != "")
            {
                labLot.Text = "Lot# ";
            }
            hidLotNo.Text = ds.Tables[0].Rows[0]["LotNo"].ToString();

            txtMAWB.Text = ds.Tables[0].Rows[0]["MAWB"].ToString();

            CmbSalesman.setValue(ds.Tables[0].Rows[0]["air_Sales"].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();

            CmbCarrierRight.setValue(ds.Tables[0].Rows[0]["Carrier"].ToString());
            txtFlightRight.Text = ds.Tables[0].Rows[0]["FlightNo"].ToString();
            CmbFromRight.setValue(ds.Tables[0].Rows[0]["From"].ToString());
            CmbToRight.setValue(ds.Tables[0].Rows[0]["To"].ToString());
            txtETD.Text = ds.Tables[0].Rows[0]["ETD"].ToString();
            txtETA.Text = ds.Tables[0].Rows[0]["ETA"].ToString();
            txtATD.Text = ds.Tables[0].Rows[0]["ATD"].ToString();
            txtATA.Text = ds.Tables[0].Rows[0]["ATA"].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();
            }
            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]["Rate"].ToString()))
            {
                txtRate.Text = ds.Tables[0].Rows[0]["Rate"].ToString();
            }

            txtRemark.Text    = ds.Tables[0].Rows[0]["air_Remark"].ToString();
            txtAccount.Text   = ds.Tables[0].Rows[0]["air_AccountRemark"].ToString();
            txtOperation.Text = ds.Tables[0].Rows[0]["air_OperationRemark"].ToString();

            bool ismakeMawb = ds.Tables[0].Rows[0]["air_MakeMAWB"].ToString() == "" ? false : Convert.ToBoolean(ds.Tables[0].Rows[0]["air_MakeMAWB"]);

            string flag = "N";
            if (ismakeMawb)
            {
                flag = "Y";
            }
            X.AddScript("isMawbFlag='" + flag + "';");


            if (ds.Tables[1].Rows.Count > 0)
            {
                GridFlightList.GetStore().DataSource = ds.Tables[1];
                GridFlightList.GetStore().DataBind();
            }

            if (ds.Tables[2].Rows.Count > 0)
            {
                gpInvoice.GetStore().DataSource = ds.Tables[2];
                gpInvoice.GetStore().DataBind();
            }



            if (ds.Tables[4].Rows.Count > 0)
            {
                lblCurForeign.Text            = ds.Tables[4].Rows[0]["Currency"].ToString();
                CmbForeign.SelectedItem.Value = ds.Tables[4].Rows[0]["Currency"].ToString();
                gpForeign.GetStore().DataSource = ds.Tables[4];
                gpForeign.GetStore().DataBind();
            }

            if (ds.Tables[5].Rows.Count > 0)
            {
                hidForeignID.Text = ds.Tables[5].Rows[0]["RowID"].ToString();
                CmbCompany.setValue(ds.Tables[5].Rows[0]["CompanyCode"].ToString());
                CmbCompany.Text = ds.Tables[5].Rows[0]["CompanyName"].ToString();
                txtFor.Text     = ds.Tables[5].Rows[0]["Min"].ToString();
            }
            if (ds.Tables[6].Rows.Count > 0)
            {
                lblCurLocal.Text            = ds.Tables[6].Rows[0]["Currency"].ToString();
                CmbLocal.SelectedItem.Value = ds.Tables[6].Rows[0]["Currency"].ToString();
                gpLocal.GetStore().DataSource = ds.Tables[6];
                gpLocal.GetStore().DataBind();
            }
            if (ds.Tables[7].Rows.Count > 0)
            {
                hidLocalID.Text = ds.Tables[7].Rows[0]["RowID"].ToString();
                CmbCompany1.setValue(ds.Tables[7].Rows[0]["CompanyCode"].ToString());
                CmbCompany1.Text = ds.Tables[7].Rows[0]["CompanyName"].ToString();
                txtLoc.Text      = ds.Tables[7].Rows[0]["Min"].ToString();
            }
            if (ds.Tables[8].Rows.Count > 0)
            {
                gpWTForeign.GetStore().DataSource = ds.Tables[8];
                gpWTForeign.GetStore().DataBind();
            }
            if (ds.Tables[9].Rows.Count > 0)
            {
                gpWTLocal.GetStore().DataSource = ds.Tables[9];
                gpWTLocal.GetStore().DataBind();
            }

            if (ds.Tables.Count > 10)
            {
                l_from.setValue(ds.Tables[10].Rows[0]["From"].ToString());
                l_to.setValue(ds.Tables[10].Rows[0]["To"].ToString());
                l_etd.Text = ds.Tables[10].Rows[0]["ETD"].ToString();
                l_eta.Text = ds.Tables[10].Rows[0]["ETA"].ToString();
            }

            if (hidLotNo.Text != "")
            {
                if (ControlBinder.IsDisplayLotNo(txtETD.Text.Trim(), hidLotNo.Text))
                {
                    btnUpdateLotNo.Show();
                }
                else
                {
                    btnUpdateLotNo.Hide();
                }
            }

            if (ds.Tables[0].Rows[0]["Active"].ToString() == "Y")
            {
                img_void.Style.Value = "display:none";
                if (labLotNo.Text != "")
                {
                    X.AddScript("$('#showGenerate').show();");
                }
            }
            else
            {
                img_void.Style.Value = "display:inline";
                btnSave.Disabled     = true;
                btnCancel.Disabled   = true;
                btnRevert.Disabled   = true;
                X.AddScript("$('#showGenerate').hide();");
                btnVoid.Text = "Active";
                hidVoid.Text = "1";
                btnUpdateLotNo.Hide();
            }
            ControlBinder.pageTitleMsg(false, showname + ":" + hidLotNo.Text, "<p>Status :  Edit  No. of  <span>" + hidLotNo.Text + "</span></p>", div_bottom);
        }
        else
        {
            ControlBinder.pageTitleMsg(false, showname, "<p>Status :  New Blank  No. </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);
    }
Beispiel #9
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);
        }
    }