Example #1
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);
        }
    }
Example #2
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);
        }
    }
Example #3
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);
        }
    }