示例#1
0
    public void BindPreVoyag(string id)
    {
        if (id != "")
        {
            StorePreVoyage.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", cmbpreVessel.Text)
            }).GetTable();
            StorePreVoyage.DataSource = dt1;
            StorePreVoyage.DataBind();

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

            cmbpreVoyage.SelectedItem.Value = id;

            txtpreonboard.Text = dt.Rows[0][8].ToString();
        }
    }
示例#2
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("");
            }
        }
    }
示例#3
0
    public void StorePreVoyage_OnRefreshData(object sender, StoreRefreshDataEventArgs e)
    {
        StorePreVoyage.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", cmbpreVessel.Text)
        }).GetTable();

        StorePreVoyage.DataSource = dt;
        StorePreVoyage.DataBind();
    }
示例#4
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);
    }