コード例 #1
0
        private MediaInvestment BuildMediaInvestment(MediaInvestment tmpMediaInvestment)
        {
            PlanBMediaViewModel _PlanBMedia = (PlanBMediaViewModel)this.DataContext;

            if (tmpMediaInvestment == null)
            {
                tmpMediaInvestment = new MediaInvestment();
            }

            tmpMediaInvestment.Station = this.txtStation.Text;
            tmpMediaInvestment.Jan     = System.Convert.ToInt32(_PlanBMedia.txtJan);
            tmpMediaInvestment.Feb     = System.Convert.ToInt32(_PlanBMedia.txtFeb);
            tmpMediaInvestment.Mar     = System.Convert.ToInt32(_PlanBMedia.txtMar);
            tmpMediaInvestment.Apr     = System.Convert.ToInt32(_PlanBMedia.txtApr);
            tmpMediaInvestment.May     = System.Convert.ToInt32(_PlanBMedia.txtMay);
            tmpMediaInvestment.June    = System.Convert.ToInt32(_PlanBMedia.txtJune);
            tmpMediaInvestment.July    = System.Convert.ToInt32(_PlanBMedia.txtJuly);
            tmpMediaInvestment.Aug     = System.Convert.ToInt32(_PlanBMedia.txtAug);
            tmpMediaInvestment.Sept    = System.Convert.ToInt32(_PlanBMedia.txtSept);
            tmpMediaInvestment.Oct     = System.Convert.ToInt32(_PlanBMedia.txtOct);
            tmpMediaInvestment.Nov     = System.Convert.ToInt32(_PlanBMedia.txtNov);
            tmpMediaInvestment.Dec     = System.Convert.ToInt32(_PlanBMedia.txtDec);

            return(tmpMediaInvestment);
        }
コード例 #2
0
        private void fillMonths_Click(object sender, RoutedEventArgs e)
        {
            PlanBMediaViewModel _PlanBMedia = (PlanBMediaViewModel)this.DataContext;

            _PlanBMedia.txtFeb  = _PlanBMedia.txtJan;
            _PlanBMedia.txtMar  = _PlanBMedia.txtJan;
            _PlanBMedia.txtApr  = _PlanBMedia.txtJan;
            _PlanBMedia.txtMay  = _PlanBMedia.txtJan;
            _PlanBMedia.txtJune = _PlanBMedia.txtJan;
            _PlanBMedia.txtJuly = _PlanBMedia.txtJan;
            _PlanBMedia.txtAug  = _PlanBMedia.txtJan;
            _PlanBMedia.txtSept = _PlanBMedia.txtJan;
            _PlanBMedia.txtOct  = _PlanBMedia.txtJan;
            _PlanBMedia.txtNov  = _PlanBMedia.txtJan;
            _PlanBMedia.txtDec  = _PlanBMedia.txtJan;
        }