Пример #1
0
        public void SetInterventionToEdit()
        {
            TotalInfoSelectedEl = new TotalsIfo()
            {
                TotalHours         = -SelectedInterventionDetails.LocalIntervention.DateHourDetail.Duration,
                TotalInverventions = -1,
                TotalRevenue       = -SelectedInterventionDetails.LocalIntervention.Revenue,
                TotalProfit        = -SelectedInterventionDetails.LocalIntervention.Percent
            };
            SelectedArea = SelectedInterventionDetails.LocalIntervention.Area != null?Areas.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.Area.Id) : null;

            if (SelectedInterventionDetails.LocalIntervention.Location != null)
            {
                SelectedLocation = LocalLocations.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.Location.Id);
            }
            if (SelectedInterventionDetails.LocalIntervention.Material != null && Materials != null)
            {
                SelectedMaterial = Materials.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.Material.Id);
            }
            SelectedPatient = PatientsList.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.PatientId);
            SelectedWork    = SelectedInterventionDetails.LocalIntervention.Lucrare != null?Works.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.Lucrare.Id) : new LocalWork();

            Durata             = SelectedInterventionDetails.Durata.TotalMinutes.ToString();
            Date               = SelectedInterventionDetails.LocalIntervention.DateHourDetail.Date;
            StartingHour       = SelectedInterventionDetails.LocalIntervention.DateHourDetail.StartHour;
            Revenue            = SelectedInterventionDetails.LocalIntervention.Revenue;
            Id                 = SelectedInterventionDetails.LocalIntervention.Id;
            LocalIntervention  = SelectedInterventionDetails.LocalIntervention;
            Observation        = SelectedInterventionDetails.Observations;
            IsInEditMode       = true;
            WasPayedByDental   = SelectedInterventionDetails.WasPayedByDental;
            SelectedTechnician =
                Technicians.FirstOrDefault(item => item.Id == SelectedInterventionDetails.LocalIntervention.TechnicianId);
            MaterialCost = SelectedInterventionDetails.MaterialCost;
        }
Пример #2
0
 public AllLocals(NWObjectBase o)
 {
     Int      = new LocalInts(o);
     String   = new LocalStrings(o);
     Float    = new LocalFloats(o);
     Object   = new LocalObjects(o);
     Location = new LocalLocations(o);
 }