示例#1
0
    /// <summary>
    /// 控件初始化
    /// </summary>
    #region   ComboBoxBinder()    Author :Micro   (2011-09-06)
    void ControlsInit()
    {
        txtMawb.Focus(true);

        labLotNo.Text       = "";
        labAeLotNo.Text     = "";
        txtMawb.Text        = "";
        txtReference.Text   = "";
        txtClearence.Text   = "";
        CmbCarrierCode.Text = "";
        //CmbCarrierText.Value = "";
        CmbShipperCode.Text = "";
        //CmbShipperText.Value = "";
        CmbConsigneeCode.Text = "";
        //CmbConsigneeText.Value = "";
        CmbNotify1Code.Text = "";
        //CmbNotify1Text.Value = "";
        CmbNotify2Code.Text = "";
        //CmbNotify2Text.Value = "";
        CmbDischargeCode.Text = "";
        //CmbDischargeText.Value = "";
        CmbSalesman.Text  = "";
        chbDirect.Checked = false;
        txtGWT.Text       = "";
        txtVWT.Text       = "";
        txtCWT.Text       = "";
        txtPiece.Text     = "";
        txtPallet.Text    = "";
        //CmbUnit.Text = "";
        txtRemark.Text       = "";
        txtATA.Text          = "";
        txtATD.Text          = "";
        txtETA.Text          = "";
        txtETD.Text          = "";
        txtFlightRight.Text  = "";
        CmbCarrierRight.Text = "";
        CmbFromRight.setValue("");
        CmbToRight.setValue("");
        // CmbCompanyRightCode.Text = "";
        // CmbCompanyRightText.Text = "";
        //CmbCurrencyRight.Text = "";
        CmbUnit.setValue("CTN");
        //CmbUnit.Text="CTN";
        //td_sales1.Style.Value = "display:none";
        td_sales2.Style.Value = "display:none";
    }
示例#2
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);
        }
    }
示例#3
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);
        }
    }
示例#4
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);
        }
    }
示例#5
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);
        }
    }