Esempio n. 1
0
    /// <summary>
    /// 绑定Grid
    /// </summary>
    #region   GridListBinder()    Author :Micro   (2011-09-05)
    void GridListBinder()
    {
        StoreHawb.DataSource = GetList("FW_AirImport_Joblist_SP", "HAWBList", "air_Seed", hidSeed.Text);
        StoreHawb.DataBind();

        StoreFlight.DataSource = GetList("FW_AirImport_ShipmentRoute_SP", "List", "sr_Seed", hidSeed.Text);
        StoreFlight.DataBind();

        StoreInvoice.DataSource = GetList("FW_AirImport_Invoice_SP", "List", "inv_Seed", hidSeed.Text);
        StoreInvoice.DataBind();
    }
Esempio n. 2
0
    /// <summary>
    /// 数据绑定
    /// </summary>
    #region   ///Grid 数据绑定     Author:Micro   (2011-09-27)
    void DataBinder()
    {
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanImport_MBLList_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "Single")
            .Append("o_Seed", hidSeed.Text == "0"?(object)DBNull.Value:(object)hidSeed.Text)
        }).GetList();

        if (ds != null)
        {
            DataBinder(ds.Tables[0]);

            storeHBL.DataSource = ds.Tables[1];
            storeHBL.DataBind();
            if (ds.Tables[1].Rows.Count > 0)
            {
                double GWT = 0.000, Pieces = 0, CBM = 0.000, wm = 0.000;
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    GWT    += Convert.ToDouble(ds.Tables[1].Rows[i]["CWT"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["CWT"].ToString());
                    Pieces += Convert.ToDouble(ds.Tables[1].Rows[i]["PKGS"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["PKGS"].ToString());
                    CBM    += Convert.ToDouble(ds.Tables[1].Rows[i]["CBM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["CBM"].ToString());
                    wm     += Convert.ToDouble(ds.Tables[1].Rows[i]["WM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["WM"].ToString());
                }
                if (Pieces.ToString() != "0")
                {
                    txtAPiece.Text = Pieces.ToString();
                }
                if (GWT.ToString() != "0")
                {
                    txtAGWT.Text = GWT.ToString();
                }
                if (CBM.ToString() != "0")
                {
                    txtACBM.Text = CBM.ToString();
                }
                if (wm.ToString() != "0")
                {
                    txtAWM.Text = wm.ToString();
                }
            }

            StoreInvoice.DataSource = ds.Tables[2];
            StoreInvoice.DataBind();
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "OI-M New", "<p>Status : New Blank  MBL </p>", div_bottom);
        }
    }
Esempio n. 3
0
    public void btnVoid_Click()
    {
        string seedid = hidSeed.Text;

        if (!VoidCheckAC.CheckisAC("AI", hidSeed.Text))
        {
            X.MessageBox.Alert("Status", VoidCheckAC.Message).Show();
            return;
        }

        if (seedid.Length > 1)
        {
            string  voidflag = hidVoid.Text == "0" ? "Y" : "N";
            DataSet l        = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_CallVoid_SP", new List <IFields>()
            {
                dal.CreateIFields().Append("Option", "A").Append("Type", "MAWB").Append("VoidFlag", voidflag)
                .Append("seed", hidSeed.Text == ""?null:hidSeed.Text)
            }).GetList();
            if (l != null && l.Tables[0].Rows[0][0].ToString() == "Y")
            {
                X.AddScript("$('#img_void').css('display','inline');");
                btnSave.Disabled   = true;
                btnCancel.Disabled = true;
                btnNext.Disabled   = true;
                btnVoid.Text       = "Active";
                hidVoid.Text       = "1";
                X.AddScript("$('#showHBL').hide();");
                btnUpdateLotNo.Hide();
            }
            else if (l != null && l.Tables[0].Rows[0][0].ToString() == "N")
            {
                X.AddScript("$('#img_void').css('display','none');");
                btnSave.Disabled   = false;
                btnCancel.Disabled = false;
                btnNext.Disabled   = false;
                btnVoid.Text       = "Void";
                hidVoid.Text       = "0";
                X.AddScript("$('#showHBL').show();");
            }
            else
            {
                ControlBinder.pageTitleMsg(false, "AI-M:" + labLotNo.Text, "<p class=\"error\"> Status : Saving  failed  ! ! !   </p>", div_bottom);
            }
            DataBinder();
            StoreInvoice.DataSource = GetList("FW_AirImport_Invoice_SP", "List", "inv_Seed", hidSeed.Text);
            StoreInvoice.DataBind();
            ControlBinder.pageTitleMsg(true, "AI-M:" + labLotNo.Text, "<p>Status :  Edit  MAWB  of <span>" + labLotNo.Text + "</span></p>", div_bottom);
        }
    }
Esempio n. 4
0
    /// <summary>
    /// 数据绑定
    /// </summary>
    #region   ///Grid 数据绑定     Author:Micro   (2011-09-27)
    void DataBinder()
    {
        //tooltip.Html = ControlBinder.GetCostTotal(hidSeed.Text);
        DataSet ds = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_OceanExport_MBL_SP", new List <IFields>()
        {
            dal.CreateIFields()
            .Append("Option", "Single")
            .Append("o_Seed", hidSeed.Text == ""?null:hidSeed.Text)
            .Append("str", hidIDList.Text)
            .Append("o_STAT", FSecurityHelper.CurrentUserDataGET()[12])
            .Append("o_LocPOL", FSecurityHelper.CurrentUserDataGET()[4])
        }).GetList();



        if (ds != null && hidSeed.Text.Length > 1)
        {
            DataBinder(ds.Tables[0]);

            if (ds.Tables[1].Rows.Count > 0)
            {
                storeHBL.DataSource = ds.Tables[1];
                storeHBL.DataBind();
                double GWT = 0.000, Pieces = 0, CBM = 0.000, wm = 0.000;
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    GWT    += Convert.ToDouble(ds.Tables[1].Rows[i]["o_WT"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_WT"].ToString());
                    Pieces += Convert.ToDouble(ds.Tables[1].Rows[i]["o_PKGS"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["o_PKGS"].ToString());
                    CBM    += Convert.ToDouble(ds.Tables[1].Rows[i]["o_CBM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_CBM"].ToString());
                    wm     += Convert.ToDouble(ds.Tables[1].Rows[i]["o_WM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_WM"].ToString());
                }
                if (Pieces.ToString() != "0")
                {
                    txtAPiece.Text = Pieces.ToString();
                }
                if (GWT.ToString() != "0")
                {
                    txtAGWT.Text = GWT.ToString();
                }
                if (CBM.ToString() != "0")
                {
                    txtACBM.Text = CBM.ToString();
                }
                if (wm.ToString() != "0")
                {
                    txtAWM.Text = wm.ToString();
                }
                totalPiece.Text = txtAPiece.Text;
                totalGWT.Text   = txtAGWT.Text;
                totalCBM.Text   = txtACBM.Text;
            }
            StoreInvoice.DataSource = ds.Tables[2];
            StoreInvoice.DataBind();
        }
        else if (ds != null && hidSeed.Text == "")
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                CmbUnit.Value             = ds.Tables[0].Rows[0]["Unit"].ToString();
                cmbPPD.SelectedItem.Value = ds.Tables[0].Rows[0]["PPD"].ToString();
                cmbLoading.Value          = ds.Tables[0].Rows[0]["Loading"].ToString();
                cmbShipperCode.setValue(ds.Tables[0].Rows[0]["Shipper"].ToString());
                cmbShipperCode.Text = ds.Tables[0].Rows[0]["ShipperName"].ToString();
            }
            if (ds.Tables[1].Rows.Count > 0)
            {
                storeHBL.DataSource = ds.Tables[1];
                storeHBL.DataBind();
                double GWT = 0.000, Pieces = 0, CBM = 0.000, wm = 0.000;
                for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
                {
                    GWT    += Convert.ToDouble(ds.Tables[1].Rows[i]["o_WT"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_WT"].ToString());
                    Pieces += Convert.ToDouble(ds.Tables[1].Rows[i]["o_PKGS"].ToString() == "" ? "0" : ds.Tables[1].Rows[i]["o_PKGS"].ToString());
                    CBM    += Convert.ToDouble(ds.Tables[1].Rows[i]["o_CBM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_CBM"].ToString());
                    wm     += Convert.ToDouble(ds.Tables[1].Rows[i]["o_WM"].ToString() == "" ? "0.000" : ds.Tables[1].Rows[i]["o_WM"].ToString());
                }
                if (Pieces.ToString() != "0")
                {
                    txtAPiece.Text = Pieces.ToString();
                }
                if (GWT.ToString() != "0")
                {
                    txtAGWT.Text = GWT.ToString();
                }
                if (CBM.ToString() != "0")
                {
                    txtACBM.Text = CBM.ToString();
                }
                if (wm.ToString() != "0")
                {
                    txtAWM.Text = wm.ToString();
                }
                totalPiece.Text = txtAPiece.Text;
                totalGWT.Text   = txtAGWT.Text;
                totalCBM.Text   = txtACBM.Text;
            }
            ControlBinder.pageTitleMsg(false, "OE-M New", "<p>Status : New Blank  MBL. </p>", div_bottom);
        }
        else
        {
            ControlBinder.pageTitleMsg(false, "OE-M New", "<p>Status : New Blank  MBL. </p>", div_bottom);
        }

        //txtMBL.Focus(true);
        CmbGroup.Focus(true);
    }