Exemple #1
0
        public List <string> getBatchList(ref List <string> List)
        {
            Batch b = new Batch();

            b = this.getBatch();
            if (b != null)
            {
                string val = b.getBatch().ToString();
                if (b.getRepeat() == true)
                {
                    val += " R";
                }
                List.Add(String.Format("{0}-{1}-{2}", this.crsID, "All", val));
            }

            else
            {
                foreach (Section s in crsSec)
                {
                    b = this.getBatch(s.getID());
                    if (b == null)
                    {
                        continue;
                    }

                    else
                    {
                        string val = b.getBatch().ToString();
                        if (b.getRepeat() == true)
                        {
                            val += " R";
                        }
                        List.Add(String.Format("{0}-{1}-{2}", this.crsID, s.getID(), val));
                    }
                }
            }
            return(List);
        }
        public bool Compare(Batch compare)
        {
            if (compare == null)
            {
                return(false);
            }
            if ((this.getBatch() == compare.getBatch()) && (this.getColor() == compare.getColor()) && (this.getRepeat() == compare.getRepeat()))
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }
 public void setBatch(Batch b)
 {
     batch.setBatch(b.getBatch());
     batch.setColor(b.getColor());
     batch.setRepeat(b.getRepeat());
 }