Example #1
0
        public static void Add()
        {
            List <TVD> TVDs = new List <TVD>();

            for (int i = 0; i < Current.ovens.Count; i++)
            {
                if (Current.ovens[i].IsAlive)
                {
                    for (int j = 0; j < Current.ovens[i].Floors.Count; j++)
                    {
                        if (Current.ovens[i].Floors[j].IsBaking)
                        {
                            for (int k = 0; k < Current.ovens[i].Floors[j].Stations.Count; k++)
                            {
                                TVD tvd = new TVD();
                                tvd.StationId  = Current.ovens[i].Floors[j].Stations[k].Id;
                                tvd.UserId     = TengDa.WF.Current.user.Id;
                                tvd.RunMinutes = Current.ovens[i].Floors[j].RunMinutes;
                                tvd.T          = Current.ovens[i].Floors[j].Stations[k].Temperatures;
                                tvd.V1         = Current.ovens[i].Floors[j].Vacuum;
                                TVDs.Add(tvd);
                            }
                        }
                    }
                }
            }
            string msg = string.Empty;

            if (!TVD.Add(TVDs, out msg))
            {
                Error.Alert(msg);
            }
        }