예제 #1
0
 private void ProcessWaterProfile(ProfileData data, WaterProfile wp)
 {
     wp.AcidulatedMalt = data.WaterProfile.AcidulatedMalt;
     wp.BakingSoda = data.WaterProfile.BakingSoda;
     wp.CalciumChloride = data.WaterProfile.CalciumChloride;
     wp.Chalk = data.WaterProfile.Chalk;
     wp.EpsomSalt = data.WaterProfile.EpsomSalt;
     wp.GallonsMashWater = data.WaterProfile.GallonsMashWater;
     wp.GallonsSpargeWater = data.WaterProfile.GallonsSpargeWater;
     wp.Gypsum = data.WaterProfile.Gypsum;
     wp.LacticAcid = data.WaterProfile.LacticAcid;
     wp.MashWaterDilution = data.WaterProfile.MashWaterDilution;
     wp.SlakedLime = data.WaterProfile.SlakedLime;
     wp.SpargeWaterDilution = data.WaterProfile.SpargeWaterDilution;
     wp.StartingAlkalinity = data.WaterProfile.StartingAlkalinity;
     wp.StartingCalcium = data.WaterProfile.StartingCalcium;
     wp.StartingChloride = data.WaterProfile.StartingChloride;
     wp.StartingMagnesium = data.WaterProfile.StartingMagnesium;
     wp.StartingSodium = data.WaterProfile.StartingSodium;
     wp.StartingSulfate = data.WaterProfile.StartingSulfate;
     wp.Title = data.WaterProfile.Title;
     wp.ManualPH = data.WaterProfile.ManualPH;
 }
예제 #2
0
 private void ProcessGrainInfo(ProfileData data, WaterProfile wp)
 {
     foreach (GrainInfo g in data.GrainInfos)
     {
         GrainInfo existingG = db.GrainInfos.Find(g.ID);
         if (existingG != null && g.GrainTypeID == 1) { db.GrainInfos.Remove(existingG); }
         else if (existingG != null && g.GrainTypeID > 1)
         {
             existingG.GrainTypeID = g.GrainTypeID;
             existingG.Color = g.Color;
             existingG.MashPH = g.MashPH;
             existingG.Weight = g.Weight;
         }
         else if (existingG == null && g.GrainTypeID > 1) { g.ID = -1; wp.GrainInfos.Add(g); }
     }
 }