Пример #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();
        }
    }
Пример #2
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        = "";
        }
    }
Пример #3
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("");
            }
        }
    }
Пример #4
0
 protected void cmbVesselText_Select(object sender, DirectEventArgs e)
 {
     if (cmbVesselText.SelectedItem.Value != "")
     {
         DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
         {
             dal.CreateIFields().Append("Option", "VoyageByID").
             Append("STAT", cmbVesselText.SelectedItem.Value)
         }).GetTable();
         if (dt != null && dt.Rows.Count > 0)
         {
             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);");
         }
     }
 }
Пример #5
0
    protected void cmbVesselText_Select(object sender, DirectEventArgs e)
    {
        Ext.Net.ComboBox combox = sender as ComboBox;
        if (combox.ID == "cmbpreVoyage")
        {
            if (cmbpreVessel.SelectedItem.Value != "")
            {
                DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
                {
                    dal.CreateIFields().Append("Option", "VoyageByID").
                    Append("STAT", cmbpreVoyage.SelectedItem.Value)
                }).GetTable();
                txtpreonboard.Text = dt.Rows[0][8].ToString();
            }
        }
        else
        {
            if (cmbVesselText.SelectedItem.Value != "")
            {
                DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
                {
                    dal.CreateIFields().Append("Option", "VoyageByID").
                    Append("STAT", cmbVesselText.SelectedItem.Value)
                }).GetTable();

                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();
            }
        }
    }