Exemplo n.º 1
0
        private bool postWeightTabDataGm()
        {
            //设定仅打印操作  By Zhangsong
            if (onlyPrintCheckBoxGm.CheckState == CheckState.Checked)
            {
                return(true);
            }
            string shengXinNo = shengXinNoGmTabTextBox.Text.Trim();

            if (gridViewGmTab.Rows.Count > 0 && !string.IsNullOrEmpty(shengXinNo))
            {
                List <CargoDetail> cargoDetails = (List <CargoDetail>)gridViewGmTab.DataSource;

                //foreach (var item in cargoDetails)
                //{
                //    System.Diagnostics.Debug.WriteLine(item.height);
                //}

                bool flag = ShengXinAPI.postCargoInfoGm(cargoDetails, shengXinNo);
                if (flag)
                {
                    return(true);
                }
                else
                {
                    MessageBox.Show("更新货物信息失败!");
                }
            }
            else
            {
                MessageBox.Show("请检查是否有空项!");
            }
            return(false);
        }
Exemplo n.º 2
0
        private bool getShengXinInfoByShengXinNo()
        {
            string shengXinNo = shengXinNoEcTabTextBox.Text;

            if (shengXinNo.IsNullOrEmpty())
            {
                MessageBox.Show("运单号不可为空");
            }
            else
            {
                //MessageBox.Show( ShengXinAPI.getSagawaLableByShengXinNo(shengXinNo));
                CargoDetail cargoDtail = ShengXinAPI.getCargoDetailEc(shengXinNo);
                if (cargoDtail != null)
                {
                    //cargoWeightTextBox.Text = cargoDtail.weight;
                    cargoHeightTextBox.Text = cargoDtail.height;
                    cargoLengthTextBox.Text = cargoDtail.length;
                    cargoWidthTextBox.Text  = cargoDtail.width;
                    return(true);
                }
                else
                {
                    MessageBox.Show("未查到该单号任何信息!");
                }
            }
            return(false);
        }
Exemplo n.º 3
0
        private void printLable()
        {
            string shengXinNo = shengXinNoEcTabTextBox.Text.Trim();

            if (string.IsNullOrEmpty(shengXinNo))
            {
                MessageBox.Show("运单号不可为空!");
            }
            else
            {
                string             orderNo    = shengXinLableControl1.getPageName() + "|" + shengXinNo;
                List <SagawaLabel> sagawaList = ShengXinAPI.getSagawaLableByShengXinNo(orderNo);
                if (sagawaList != null && sagawaList.Count > 0)
                {
                    foreach (var item in sagawaList)
                    {
                        if (item != null && onlyCustomsCheckBox.Checked == false)
                        {
                            switch (item.LabelType)
                            {
                            case "sagawa":
                                ArgoxPrintUtil.SagawaLablePrint(item);
                                break;

                            case "japanEmsBig":
                                ArgoxPrintUtil.JapanEmsPrint(item);
                                break;

                            case "japanEmsSmall":
                                ArgoxPrintUtil.JapanEmsSmallPrint(item);
                                break;

                            default: break;
                            }
                        }
                        //判断是否需要打印海关标签
                        if (item != null && (customsCheckBoxEc.Checked || onlyCustomsCheckBox.Checked))
                        {
                            if (eComCheckBoxEc.Checked)
                            {
                                item.eCommerce = "Y";
                            }
                            item.destination      = desComboBoxEc.SelectedItem.ToString();
                            item.flightDate       = flightDateTextBox.Text;
                            item.AgentSendCompany = item.AgentSendCompany + " 店铺";
                            ArgoxPrintUtil.CustomsPrint(item);
                        }
                    }
                    initEc();
                }
            }
        }
Exemplo n.º 4
0
        private void printLableGm()
        {
            string shengXinNo = shengXinNoGmTabTextBox.Text.Trim();

            if (string.IsNullOrEmpty(shengXinNo))
            {
                MessageBox.Show("运单号不可为空!");
            }
            else
            {
                string             orderNo    = shengXinLableControl2.getPageName() + "|" + shengXinNo;
                List <SagawaLabel> sagawaList = ShengXinAPI.getSagawaLableByShengXinNo(orderNo);
                if (sagawaList != null && sagawaList.Count > 0)
                {
                    foreach (var item in sagawaList)
                    {
                        if (item != null)
                        {
                            item.emptyStyle = "Y";
                            switch (item.LabelType)
                            {
                            case "sagawa":
                                ArgoxPrintUtil.SagawaLablePrint(item);
                                break;

                            case "japanEmsBig":
                                ArgoxPrintUtil.JapanEmsPrint(item);
                                break;

                            case "japanEmsSmall":
                                ArgoxPrintUtil.JapanEmsSmallPrint(item);
                                break;

                            default: break;
                            }
                        }
                    }
                    initGm();
                }
            }
        }
Exemplo n.º 5
0
        private bool getShengXinInfoByShengXinNoGm()
        {
            string shengXinNo = shengXinNoGmTabTextBox.Text.Trim();

            if (string.IsNullOrEmpty(shengXinNo))
            {
                MessageBox.Show("运单号不可为空!");
            }
            List <CargoDetail> cargoDetails = ShengXinAPI.getCargoDetailGm(shengXinNo);

            if (cargoDetails != null && cargoDetails.Count > 0)
            {
                gridViewGmTab.DataSource = cargoDetails;
                return(true);
            }
            else
            {
                MessageBox.Show("没有查找到该运单!");
            }

            return(false);
        }
Exemplo n.º 6
0
        private bool postWeightTabData()
        {
            //设定仅打印按钮 By Zhangsong
            if (onlyPrintCheckBoxEc.CheckState == CheckState.Checked)
            {
                return(true);
            }

            Console.WriteLine(cargoWeightTextBox.Text);

            CargoDetail cargoDetail = new CargoDetail()
            {
                weight = cargoWeightTextBox.Text.Trim(),
                height = cargoHeightTextBox.Text.Trim(),
                width  = cargoWidthTextBox.Text.Trim(),
                length = cargoLengthTextBox.Text.Trim()
            };

            string shengXinNo = shengXinNoEcTabTextBox.Text.Trim();

            if (cargoDetail.isNull() || string.IsNullOrEmpty(shengXinNo))
            {
                MessageBox.Show("请检查是否有空项!");
            }
            else
            {
                bool flag = ShengXinAPI.postCargoInfoEc(cargoDetail, shengXinNo);
                if (!flag)
                {
                    MessageBox.Show("更新货物信息失败!");
                }
                else
                {
                    return(true);
                }
            }
            return(false);
        }