コード例 #1
0
ファイル: BillOfLading.cs プロジェクト: acornils/CoreProject
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            int i = listBoxBillOfLading.SelectedIndex;

            CoreWebService.BillOfLadingCarTypeAttributesListResponse carTypeAttribute = client.deleteBillOfLadingCartypeAttribute((int)listBoxBillOfLading.SelectedValue);
            if (carTypeAttribute.Status != 0)
            {
                MessageBox.Show(carTypeAttribute.Message);
            }

            CoreWebService.BillOfLadingPathListResponse path = client.deleteBillOfLadingPath((int)listBoxBillOfLading.SelectedValue);
            if (path.Status != 0)
            {
                MessageBox.Show(path.Message);
            }

            CoreWebService.BillOfLadingResponse waybillTemplate = client.deleteBillOfLading((int)listBoxBillOfLading.SelectedValue);
            if (waybillTemplate.Status != 0)
            {
                MessageBox.Show(waybillTemplate.Message);
            }

            listBoxBillOfLading.SelectedIndex = i - 1;
            listBoxBillOfLading_SelectedIndexChanged(this, null);
        }
コード例 #2
0
ファイル: BillOfLading.cs プロジェクト: acornils/CoreProject
        private void listBoxBillOfLading_SelectedIndexChanged(object sender, EventArgs e)
        {
            CoreWebService.BillOfLadingResponse response = client.getBillOfLading((int)listBoxBillOfLading.SelectedValue);

            if (response.Status == 0)
            {
                comboBoxConsignee.SelectedValue        = response.Data.consigneeID;
                comboBoxShipper.SelectedValue          = response.Data.shipperID;
                comboBoxRequestedCarType.SelectedValue = response.Data.carTypeRequestedID;
                comboBoxRequestedCarType_SelectedIndexChanged(this, null);
                textBoxNoPkgs.Text                 = response.Data.noPackages;
                textBoxDescOfArticles.Text         = response.Data.descriptionOfArticles;
                numericUpDownRequestedLength.Value = (decimal)response.Data.carLengthRequested;
                numericUpDownCapacityTons.Value    = (decimal)response.Data.carCapacityRequested;
                checkBoxIsPerishable.Checked       = (bool)response.Data.isPerishable;
                checkBoxIsLiveStock.Checked        = (bool)response.Data.isLiveStock;
                checkBoxPreIce.Checked             = (bool)response.Data.isPreIce;
                checkBoxInitialIce.Checked         = (bool)response.Data.isInitialIce;
                checkBoxReverseRoute.Checked       = (bool)response.Data.isReverseRoute;
                checkBoxReturnEmpty.Checked        = (bool)response.Data.isReturnEmpty;
                checkBoxNextWaybill.Checked        = (bool)response.Data.isNextBillOfLading;
                numericUpDownCarsPerDay.Value      = (decimal)response.Data.requestedCarsPerDay;
                numericUpDownLoadTime.Value        = (decimal)response.Data.timeToLoad;
                numericUpDownUnloadTime.Value      = (decimal)response.Data.timeToUnload;
                comboBoxNextWaybill.SelectedValue  = (int)response.Data.nextBillOfLadingID;

                CoreWebService.BillOfLadingPathListResponse path = client.listBillOfLadingPath((int)listBoxBillOfLading.SelectedValue);
                listBoxPath.Items.Clear();

                if (path.Status == 0)
                {
                    for (int i = 0; i < path.Data.Length; i++)
                    {
                        listBoxPath.Items.Add(client.getLocation((int)path.Data[i].locationID).Data);
                    }
                }
            }
        }