示例#1
0
        private void GetOutSummmaryStatisticData()
        {
            this.OutSummaryTextBlock.Text = null;
            ReportWeightSummaryV v = WeighingBillModel.GetReportWeightSummaryData(WeightingBillType.CK, GetStartDate(), GetEndDate(), GetSeachCondition());

            if (v != null)
            {
                this.OutSummaryTextBlock.Text = String.Format(this.OutDetailTotalStatisticLabelTemplate, v.companys, v.materials, v.cars, v.traeweight, v.grossweight, v.netweight);
            }
        }
 private void RefreshCurrBillData()
 {
     if (mSendCarBilll != null)
     {
         this.SendBillInFactoryBtn.Visibility = Visibility.Collapsed;
     }
     else if (mWeighingBill != null)
     {
         mWeighingBill = WeighingBillModel.GetById(mWeighingBill.id);
         this.NoFinishGrid.DataContext = mWeighingBill;
     }
 }
示例#3
0
        private void GetOutStatisticData()
        {
            this.OutStatisticListBox.Items.Clear();
            List <ReportWeightListV> list = WeighingBillModel.GetListStatisticData(WeightingBillType.CK, GetStartDate(), GetEndDate(), GetSeachCondition());

            foreach (ReportWeightListV v in list)
            {
                this.OutStatisticListBox.Items.Add(new TextBlock()
                {
                    Text = String.Format(this.ListBoxItemLabelTemplate, v.company, v.yard, v.material, v.Cars.ToString(), v.grossweight, v.traeweight, v.weight.ToString())
                });
            }
        }
 private void DeleteNofinishedBtn_Click(object sender, RoutedEventArgs e)
 {
     if (WeighingBillModel.Delete(mWeighingBill) == 1)
     {
         MessageBox.Show("删除成功!");
         this.mWeighingBill = null;
         ShowCurrentPanel();
         RefreshRightData();
     }
     else
     {
         MessageBox.Show("删除失败!");
     }
 }
示例#5
0
        private void RefreshFinishedData()
        {
            List <WeighingBill> list = WeighingBillModel.GetInFinished();

            if (list.Count > 0)
            {
                this.FinishListView.ItemsSource = list;
                this.FinishedNumberTb.Text      = list.Count.ToString();
            }
            else
            {
                this.FinishedNumberTb.Text      = "0";
                this.FinishListView.ItemsSource = null;
            }
        }
示例#6
0
        /// <summary>
        /// 获取发货单 obtian the invoice
        /// </summary>
        private void FillCustomerSendData()
        {
            MyLoadingLib.GridLoading loading  = new MyLoadingLib.GridLoading();
            List <WeighingBill>      sendList = WeighingBillModel.GetInvoice();

            if (sendList != null && sendList.Count > 0)
            {
                this.SendBillListView.ItemsSource = sendList;
                this.SendBillCountTb.Text         = sendList.Count.ToString();
            }
            else
            {
                this.SendBillListView.ItemsSource = null;
                this.SendBillCountTb.Text         = "0";
            }
        }
示例#7
0
        private void GenerateOutChart()
        {
            this.OutMaterialCarChart.Series.Clear();
            this.OutMaterialTonChart.Series.Clear();
            this.OutCompanyCarChart.Series.Clear();
            this.OutCompanyTonChart.Series.Clear();

            Dictionary <String, Int32> materialCars = WeighingBillModel.GetOutCahartDataGroungByMaterial(GetStartDate(), GetEndDate(), GetSeachCondition());
            DataSeries materialCarsDataSeries       = new DataSeries()
            {
                RenderAs = RenderAs.Pie
            };

            foreach (var dic in materialCars)
            {
                materialCarsDataSeries.DataPoints.Add(new DataPoint()
                {
                    AxisXLabel = dic.Key, YValue = dic.Value
                });
            }

            Dictionary <String, Double> materialTons = WeighingBillModel.GetOutCahartTonDataGroungByMaterial(GetStartDate(), GetEndDate(), GetSeachCondition());
            DataSeries materialTonsDataSeries        = new DataSeries()
            {
                RenderAs = RenderAs.Doughnut
            };

            if (materialTons.Count > 3)
            {
                materialTonsDataSeries.RenderAs = RenderAs.Radar;
            }
            foreach (var dic in materialTons)
            {
                materialTonsDataSeries.DataPoints.Add(new DataPoint()
                {
                    AxisXLabel = dic.Key, YValue = dic.Value
                });
            }


            Dictionary <String, Int32> CompanyCars = WeighingBillModel.GetOutCahartDataGroungBySendCpmpany(GetStartDate(), GetEndDate(), GetSeachCondition());
            DataSeries companyCarsDataSeries       = new DataSeries()
            {
                RenderAs = RenderAs.Pie
            };

            foreach (var dic in CompanyCars)
            {
                companyCarsDataSeries.DataPoints.Add(new DataPoint()
                {
                    AxisXLabel = dic.Key, YValue = dic.Value
                });
            }


            Dictionary <String, Double> CompanyTons = WeighingBillModel.GetOutCahartTonDataGroungBySendCpmpany(GetStartDate(), GetEndDate(), GetSeachCondition());
            DataSeries companyTonsDataSeries        = new DataSeries()
            {
                RenderAs = RenderAs.Pie
            };

            if (CompanyTons.Count > 3)
            {
                companyTonsDataSeries.RenderAs = RenderAs.Radar;
            }
            foreach (var dic in CompanyTons)
            {
                companyTonsDataSeries.DataPoints.Add(new DataPoint()
                {
                    AxisXLabel = dic.Key, YValue = dic.Value
                });
            }

            this.OutMaterialCarChart.Series.Add(materialCarsDataSeries);
            this.OutMaterialTonChart.Series.Add(materialTonsDataSeries);
            this.OutCompanyCarChart.Series.Add(companyCarsDataSeries);
            this.OutCompanyTonChart.Series.Add(companyTonsDataSeries);
        }
示例#8
0
        private void GetOutData()
        {
            List <WeighingBill> list = WeighingBillModel.GetOutFinished(GetStartDate(), GetEndDate(), GetSeachCondition());

            this.OutDetailDataGrid.ItemsSource = list;
        }
 private void GetData()
 {
     mWeighingBills = WeighingBillModel.GetInvoice();
     this.SendBillDataGrid.ItemsSource = mWeighingBills;
 }