Пример #1
0
        private string AddBuffer()
        {
            int number;

            if (CountrySelected == string.Empty)
            {
                return("Select a Country to Map Car Group Codes from");
            }

            if (tbWwd.Text.Substring(0, 2).ToLower() != CountrySelected.ToLower())
            {
                return("The WWD code must match the Country selected in the Parameter Selection");
            }

            var succeeded = int.TryParse(tbValue.Text, out number);

            if (!succeeded)
            {
                return("Invalid Amount entered");
            }
            var bufferData = new BufferGridViewHolder
            {
                LocationWwd = tbWwd.Text,
                CarGroup    = tbCarGroup.Text,
                Value       = number
            };
            var message = _bufferBl.InsertManualBuffer(bufferData);

            return(message);
        }
Пример #2
0
        private void LVNationality_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (CountrySelectedCommand != null && CountrySelectedCommand.CanExecute(e.Item))
            {
                CountrySelectedCommand.Execute(e.Item);
            }

            CountrySelected?.Invoke(this, e.Item);

            IsVisible = false;
        }
Пример #3
0
        private void SelectCountry(object sender, MouseEventArgs args)
        {
            int x, y;

            GraphicalUtilities.GraphicsCoordsToMapCoords(m_mapControl1.Size, m_mapControl1.MyWorldModel.Size, args.X,
                                                         args.Y, out x,
                                                         out y);
            DiseaseNode    n  = m_mapControl1.MyWorldModel.NodeAt(x, y);
            SimCountryData cd = m_mapControl1.MyWorldModel.CountryForCode(n.MapCell.CountryCode);

            if (cd != null)
            {
                CountrySelected?.Invoke(cd);
            }
        }
Пример #4
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     if (!CountrySelected.IsNullOrEmpty())
     {
         acCarGroup.ContextKey = BufferInformation.SelectedParameters[ParameterNames.Country];
         PopulateDataGrid();
     }
     else
     {
         cpeBody.ClientState = "true";
         cpeBody.Collapsed   = true;
         BufferInformation   = new GraphData {
             ReportParameters = this.GetReportParameters(LocationLogic.Cms)
         };
     }
 }
Пример #5
0
 private void OnDestroy()
 {
     this.countrySelected = null;
 }