Exemplo n.º 1
0
        private void BindDataFromReport()
        {
            if (Report == null)
            {
                return;
            }
            if (!BindNeeded)
            {
                return;
            }
            BindNeeded = false;
            AddChargesFromReport();
            AddAdditionalPartiesFromReport();
            labeled_arrest_report_id.SetValueText(Report.ShortId());
            labeled_first_name.SetValueText(Report.FirstName);
            labeled_last_name.SetValueText(Report.LastName);
            labeled_dob.SetValueText(Function.ToLocalDateString(Report.DOB, TextBoxExtensions.DateOutputPart.DATE, TextBoxExtensions.DateOutputPart.DATE));
            labeled_home_address.SetValueText(Report.HomeAddress);

            labeled_arrest_street_address.SetValueText(Report.ArrestStreetAddress);
            labeled_arrest_city.SetValueText(Report.ArrestCity);
            labeled_arrest_date.SetValueText(Function.ToLocalDateString(Report.ArrestDate, TextBoxExtensions.DateOutputPart.DATE, TextBoxExtensions.DateOutputPart.DATE));
            labeled_arrest_time.SetValueText(Function.ToLocalDateString(Report.ArrestDate, TextBoxExtensions.DateOutputPart.TIME, TextBoxExtensions.DateOutputPart.TIME));
            tb_report_details.SetValueText(Report.Details);
        }
Exemplo n.º 2
0
        private void BindDataFromCitation()
        {
            if (Citation == null)
            {
                Function.Log("Citation is null");
                return;
            }
            if (!BindNeeded)
            {
                Function.Log("Bind not needed " + Citation.FirstName);
                return;
            }
            BindNeeded = false;


            labeled_citation_report_id.SetValueText(Citation.ShortId());
            labeled_first_name.SetValueText(Citation.FirstName);
            labeled_last_name.SetValueText(Citation.LastName);
            labeled_dob.SetValueText(Function.ToLocalDateString(Citation.DOB, TextBoxExtensions.DateOutputPart.DATE, TextBoxExtensions.DateOutputPart.DATE));
            labeled_home_address.SetValueText(Citation.HomeAddress);

            labeled_vehicle_type.Component.SelectByText(Citation.VehicleType);
            labeled_vehicle_model.SetValueText(Citation.VehicleModel);
            labeled_vehicle_color.SetValueText(Citation.VehicleColor);
            labeled_vehicle_tag.SetValueText(Citation.VehicleTag);

            labeled_citation_street_address.SetValueText(Citation.CitationStreetAddress);
            labeled_citation_city.SetValueText(Citation.CitationCity);
            labeled_citation_date.SetValueText(Function.ToLocalDateString(Citation.CitationDate, TextBoxExtensions.DateOutputPart.DATE, TextBoxExtensions.DateOutputPart.DATE));
            labeled_citation_time.SetValueText(Function.ToLocalDateString(Citation.CitationTime, TextBoxExtensions.DateOutputPart.TIME, TextBoxExtensions.DateOutputPart.TIME));
            labeled_citation_details.SetValueText(Citation.Details);

            DataBound = true;
        }