Example #1
0
        /// <summary>
        /// Generate a TPS according to ATS Set
        /// </summary>
        /// <param name="name"> TPS Name </param>
        /// <param name="atslist"> Ats Set</param>
        /// <returns></returns>
        public static TPS Create(string name, List<ATS> atslist)
        {
            TPS newTps = new TPS();
            int grpid = 0;
            string date = string.Empty;
            foreach (ATS ats in atslist)
            {
                newTps.atsset.Add(ats);
                date = ats.Date;
                grpid += ats.ID;
            }

            newTps.Name = name + "_" + ((TpsType)grpid).ToString();
            newTps.ID = (TpsType)grpid;
            newTps.Date = date;
            return newTps;
        }
Example #2
0
        /// <summary>
        /// Generate a TPS according to ATS Set
        /// </summary>
        /// <param name="name"> TPS Name </param>
        /// <param name="atslist"> Ats Set</param>
        /// <returns></returns>
        public static TPS Create(string name, List <ATS> atslist)
        {
            TPS    newTps = new TPS();
            int    grpid  = 0;
            string date   = string.Empty;

            foreach (ATS ats in atslist)
            {
                newTps.atsset.Add(ats);
                date   = ats.Date;
                grpid += ats.ID;
            }

            newTps.Name = name + "_" + ((TpsType)grpid).ToString();
            newTps.ID   = (TpsType)grpid;
            newTps.Date = date;
            return(newTps);
        }
Example #3
0
 private void ListTPSView_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
 {
     var datagrid = sender as DataGrid;
     selectedTps = datagrid.SelectedItem as TPS;
 }