Exemplo n.º 1
0
    public void BindVoyag(string id)
    {
        if (id != "")
        {
            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();

            DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageByID").
                Append("STAT", id)
            }).GetTable();

            cmbVesselText.SelectedItem.Value = id;
            txtETD.Text          = dt.Rows[0][2].ToString();
            txtETADischarge.Text = dt.Rows[0][3].ToString();
            cmbLoading.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][4].ToString()));
            cmbPort.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            cmbFinalDest.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            txtCFSClosing.Text = dt.Rows[0][6].ToString();
            txtCYClosing.Text  = dt.Rows[0][7].ToString();
            txtOnBoard.Text    = dt.Rows[0][8].ToString();
        }
    }
Exemplo n.º 2
0
    public void BindVoyag(string id)
    {
        if (id != "")
        {
            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();

            DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageByID").
                Append("STAT", id)
            }).GetTable();

            cmbVesselText.SelectedItem.Value = id;

            CmbDeparture.setValue(dt.Rows[0][4].ToString());
            CmbDest.setValue(dt.Rows[0][5].ToString());
            txtDepartDate.Text  = dt.Rows[0][2].ToString();
            txtArrivalDate.Text = dt.Rows[0][3].ToString();
            X.AddScript("$('#txtDepL').val(StoreLocation.getById($('#CmbDeparture').val()).data.text);$('#txtDesL').val(StoreLocation.getById($('#CmbDest').val()).data.text);");
        }
    }
Exemplo n.º 3
0
    void ComList()
    {
        StoreVoyage.RemoveAll();

        DataTable dt = 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 = dt;
        StoreVoyage.DataBind();
        if (dt != null && dt.Rows.Count > 0)
        {
            cmbVesselText.SelectedItem.Value = dt.Rows[0][1].ToString();

            CmbDeparture.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][4].ToString()));
            CmbDest.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            txtDepartDate.Text  = dt.Rows[0][2].ToString();
            txtArrivalDate.Text = dt.Rows[0][3].ToString();
            X.AddScript("$('#txtDepL').val(StoreLocation.getById($('#CmbDeparture').val()).data.text);$('#txtDesL').val(StoreLocation.getById($('#CmbDest').val()).data.text);");
        }
        else
        {
            CmbDeparture.setValue("");
            CmbDest.setValue("");
            txtArrivalDate.Text = "";
            txtDepartDate.Text  = "";
            txtDepL.Text        = "";
            txtDesL.Text        = "";
        }
    }
Exemplo n.º 4
0
    void ComList(ComboBox combox)
    {
        DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "VoyageList").
            Append("sys", FSecurityHelper.CurrentUserDataGET()[12]).
            Append("STAT", combox.Text)
        }).GetTable();

        if (combox.ID == "cmbpreVessel")
        {
            StorePreVoyage.RemoveAll();

            StorePreVoyage.DataSource = dt;
            StorePreVoyage.DataBind();
            if (dt != null && dt.Rows.Count > 0)
            {
                cmbpreVoyage.SelectedItem.Value = dt.Rows[0][1].ToString();
                txtpreonboard.Text = dt.Rows[0][9].ToString();
            }
            else
            {
                txtpreonboard.Text = "";
            }
        }
        else
        {
            StoreVoyage.RemoveAll();

            StoreVoyage.DataSource = dt;
            StoreVoyage.DataBind();
            if (dt != null && dt.Rows.Count > 0)
            {
                cmbVesselText.SelectedItem.Value = dt.Rows[0][1].ToString();

                txtCFSClosing.Text   = dt.Rows[0][7].ToString();
                txtCYClosing.Text    = dt.Rows[0][8].ToString();
                txtOnBoard.Text      = dt.Rows[0][9].ToString();
                txtETD.Text          = dt.Rows[0][2].ToString();
                txtETADischarge.Text = dt.Rows[0][3].ToString();
                cmbLoading.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][4].ToString()));
                cmbPort.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
                cmbFinalDest.setValue(BaseCheckCode.locationCheckCode(dt.Rows[0][5].ToString()));
            }
            else
            {
                txtCFSClosing.Text   = "";
                txtCYClosing.Text    = "";
                txtOnBoard.Text      = "";
                txtETD.Text          = "";
                txtETADischarge.Text = "";
                cmbLoading.setValue("");
                cmbPort.setValue("");
                cmbFinalDest.setValue("");
            }
        }
    }
Exemplo n.º 5
0
    public void StoreVoyage_OnRefreshData(object sender, StoreRefreshDataEventArgs e)
    {
        StoreVoyage.RemoveAll();

        DataTable dt = 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 = dt;
        StoreVoyage.DataBind();
    }
Exemplo n.º 6
0
    void ComList()
    {
        StoreVoyage.RemoveAll();

        DataTable dt = 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 = dt;
        StoreVoyage.DataBind();
        if (dt != null && dt.Rows.Count > 0)
        {
            cmbVesselText.SelectedItem.Value = dt.Rows[0][1].ToString();
        }
    }
Exemplo n.º 7
0
    public void BindVoyag(string id)
    {
        if (id != "")
        {
            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();

            DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "VoyageByID").
                Append("STAT", id)
            }).GetTable();

            cmbVesselText.SelectedItem.Value = id;
        }
    }
Exemplo n.º 8
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);
    }
Exemplo n.º 9
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);
        }
    }
Exemplo n.º 10
0
 protected void cmbVessel_Select(object sender, DirectEventArgs e)
 {
     cmbVesselText.Text = "";
     StoreVoyage.RemoveAll();
     ComList();
 }
Exemplo n.º 11
0
    /// <summary>
    /// 初始数据
    /// </summary>
    public void Binder()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_WarehouseEntry_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "select")
            .Append("we_seed", seed.Value)
            .Append("co_code", FSecurityHelper.CurrentUserDataGET()[12])
            .Append("we_User", FSecurityHelper.CurrentUserDataGET()[0])
            .Append("we_ROWID", rowid.Value)
        }).GetList();
        DataTable dt = ds.Tables[0];

        if (dt != null && ds.Tables.Count == 2 && ds.Tables[1].Rows[0][0].ToString() == "Y")
        {
            labImpLotNo.Text = dt.Rows[0]["lotno"].ToString();
            labMBL.Text      = dt.Rows[0]["mbl"].ToString();
            txtCompany.setValue(dt.Rows[0]["we_Company"].ToString());
            txtCompanyName.Text = dt.Rows[0]["we_HandleName"].ToString();
            txtCustomer.setValue(dt.Rows[0]["we_Customer"].ToString());
            txtCustomerLine.Text = dt.Rows[0]["we_CustomerLine"].ToString();
            txtNoticeDate.Text   = dt.Rows[0]["we_NoticeDate"].ToString();
            txtOperation.Text    = dt.Rows[0]["we_OperationUser"].ToString();
            txtOpExt.Text        = dt.Rows[0]["we_OperationExt"].ToString();
            txtDcument.Text      = dt.Rows[0]["we_DocumnetUser"].ToString();
            txtDocExt.Text       = dt.Rows[0]["we_DocumnetExt"].ToString();
            txtPhone.Text        = dt.Rows[0]["we_ContactTel"].ToString();
            txtFax.Text          = dt.Rows[0]["we_ContactFax"].ToString();
            txtPOD.setValue(dt.Rows[0]["we_POD"].ToString());

            cmbVesselCode.Text = dt.Rows[0]["we_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();
            cmbVesselText.Template.Html = TempVoyage.Html;
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                cmbVesselText.Value = dt.Rows[0]["we_Voyage"].ToString();
            }
            //cmbVesselText.Text = dt.Rows[0]["we_Voyage"].ToString();
            txtDeclareNo.Text = dt.Rows[0]["we_DeclareNo"].ToString();
            txtNoticeNo.Text  = dt.Rows[0]["we_NoticeNo"].ToString();
            txtETD.Text       = dt.Rows[0]["we_ETD"].ToString();

            txtWsheTime.Text   = dt.Rows[0]["we_warehouseclosingtime"].ToString();
            txtHandleTime.Text = dt.Rows[0]["we_docmentclosingtime"].ToString();

            txtWhseClosing.Text = dt.Rows[0]["we_WarehouseClosing"].ToString();
            txtwarehouse.setValue(dt.Rows[0]["we_WarehouseCode"].ToString());
            txtWsheName.Text      = dt.Rows[0]["we_WarehouseName"].ToString();
            txtwhseAdd.Text       = dt.Rows[0]["we_WarehouseAddress"].ToString();
            txtWsheContact.Text   = dt.Rows[0]["we_WarehousePerson"].ToString();
            txtWshePhone.Text     = dt.Rows[0]["we_WarehouseTel"].ToString();
            txtWsheExt.Text       = dt.Rows[0]["we_WarehouseExt"].ToString();
            txtWsheFxt.Text       = dt.Rows[0]["we_WarehouseFax"].ToString();
            txtHandleClosing.Text = dt.Rows[0]["we_DocmentClosing"].ToString();
            txtHandle.setValue(dt.Rows[0]["we_HandleCode"].ToString());
            txtHandleName.Text   = dt.Rows[0]["we_HandleName"].ToString();
            txtHandleAdd.Text    = dt.Rows[0]["we_HandleAddress"].ToString();
            txtHandlContact.Text = dt.Rows[0]["we_HandlePerson"].ToString();
            txtHandlPhone.Text   = dt.Rows[0]["we_HandleTel"].ToString();
            txtHandlExt.Text     = dt.Rows[0]["we_HandleExt"].ToString();
            txtHandlFxt.Text     = dt.Rows[0]["we_HandleFax"].ToString();

            ControlBinder.pageTitleMsg(false, this, "<p class=\"success\">Status : Edit warehouse information.</p>", div_bottom);
        }
        else if (ds != null && ds.Tables.Count == 5 && ds.Tables[1].Rows.Count > 0 && ds.Tables[4].Rows[0][0].ToString() == "N")
        {
            labImpLotNo.Text = ds.Tables[1].Rows[0]["lotno"].ToString();
            labMBL.Text      = ds.Tables[1].Rows[0]["mbl"].ToString();

            txtCompany.setValue(ds.Tables[3].Rows[0]["we_Company"].ToString());
            txtCompanyName.Text  = ds.Tables[3].Rows[0]["we_CompanyName"].ToString();
            txtCustomer.Text     = "";
            txtCustomerLine.Text = "";
            txtNoticeDate.Text   = ds.Tables[1].Rows[0]["we_NoticeDate"].ToString();
            txtOperation.Text    = ds.Tables[2].Rows[0]["we_OperationUser"].ToString();
            txtOpExt.Text        = ds.Tables[2].Rows[0]["we_OperationExt"].ToString();
            txtDcument.Text      = "";
            txtDocExt.Text       = "";
            txtPhone.Text        = "";
            txtFax.Text          = "";
            txtPOD.setValue(ds.Tables[1].Rows[0]["we_POD"].ToString());

            cmbVesselCode.Text = ds.Tables[1].Rows[0]["we_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();
            cmbVesselText.Template.Html = TempVoyage.Html;
            if (dt1 != null && dt1.Rows.Count > 0)
            {
                cmbVesselText.Value = ds.Tables[1].Rows[0]["we_Voyage"].ToString();
            }
            //cmbVesselText.Text = dt.Rows[0]["we_Voyage"].ToString();
            txtDeclareNo.Text = "";
            txtNoticeNo.Text  = ds.Tables[1].Rows[0]["we_NoticeNo"].ToString();
            txtETD.Text       = ds.Tables[1].Rows[0]["we_ETD"].ToString();

            ////txtWsheTime.Text = "";
            //txtHandleTime.Text = "";

            txtWhseClosing.Text = "";
            txtwarehouse.setValue(ds.Tables[0].Rows[0]["we_WarehouseCode"].ToString());
            txtWsheName.Text      = ds.Tables[0].Rows[0]["we_WarehouseName"].ToString();
            txtwhseAdd.Text       = ds.Tables[0].Rows[0]["we_WarehouseAddress"].ToString();
            txtWsheContact.Text   = ds.Tables[0].Rows[0]["we_WarehousePerson"].ToString();
            txtWshePhone.Text     = ds.Tables[0].Rows[0]["we_WarehouseTel"].ToString();
            txtWsheExt.Text       = ds.Tables[0].Rows[0]["we_WarehouseExt"].ToString();
            txtWsheFxt.Text       = ds.Tables[0].Rows[0]["we_WarehouseFax"].ToString();
            txtHandleClosing.Text = "";
            txtHandle.setValue(ds.Tables[3].Rows[0]["we_Company"].ToString());
            txtHandleName.Text   = ds.Tables[3].Rows[0]["we_CompanyName"].ToString();
            txtHandleAdd.Text    = ds.Tables[3].Rows[0]["we_HandleAddress"].ToString();
            txtHandlContact.Text = ds.Tables[3].Rows[0]["we_HandlePerson"].ToString();
            txtHandlPhone.Text   = ds.Tables[3].Rows[0]["we_HandleTel"].ToString();
            txtHandlExt.Text     = "";
            txtHandlFxt.Text     = ds.Tables[3].Rows[0]["we_HandleFax"].ToString();
            ControlBinder.pageTitleMsg(false, "New WareHouse", "<p>Status : New blank wareHouse information. </p>", div_bottom);
        }
        else
        {
            Response.Write("Error: invalid parameter, please check the data.");
            Response.End();
            Response.Flush();
            Response.Clear();
        }
    }