Example #1
0
        public static bool TryParse(string s, out SifraGrupe result)
        {
            result = new SifraGrupe();

            s = s.Trim();
            if (String.IsNullOrEmpty(s))
            {
                return(false);
            }

            if (!startsWithDigit(s))
            {
                return(false);
            }

            string[] parts = getParts(s);
            int      broj;

            try
            {
                broj = Int32.Parse(parts[0]);
            }
            catch (Exception)
            {
                return(false);
            }
            string podgrupa = parts[1].Trim();

            result = new SifraGrupe(broj, podgrupa);
            return(true);
        }
Example #2
0
 public Grupa(SifraGrupe sifra, string naziv, Kategorija kategorija, FinansijskaCelina finansijskaCelina)
 {
     this.sifra             = sifra;
     this.naziv             = naziv;
     this.kategorija        = kategorija;
     this.finansijskaCelina = finansijskaCelina;
 }
        public MesecnaClanarinaDialog(Nullable<int> entityId, SifraGrupe pocetnaSifraGrupe)
        {
            if (entityId != null)
                throw new ArgumentException("CenaDialog radi samo u add modu.");

            InitializeComponent();
            this.pocetnaSifraGrupe = pocetnaSifraGrupe;
            initialize(entityId, true);
        }
Example #4
0
        public override bool Equals(object other)
        {
            if (object.ReferenceEquals(this, other))
            {
                return(true);
            }
            if (!(other is SifraGrupe))
            {
                return(false);
            }
            SifraGrupe that = (SifraGrupe)other;

            return(this.BrojGrupe == that.BrojGrupe && this.Podgrupa == that.Podgrupa);
        }
Example #5
0
        public int CompareTo(object obj)
        {
            if (!(obj is SifraGrupe))
            {
                throw new ArgumentException();
            }

            SifraGrupe other       = (SifraGrupe)obj;
            int        brojCompare = this.brojGrupe.CompareTo(other.brojGrupe);

            if (brojCompare != 0)
            {
                return(brojCompare);
            }
            else
            {
                return(this.podgrupa.CompareTo(other.podgrupa));
            }
        }
Example #6
0
        public static bool TryParse(string s, out SifraGrupe result)
        {
            result = new SifraGrupe();

            s = s.Trim();
            if (String.IsNullOrEmpty(s))
                return false;

            if (!startsWithDigit(s))
                return false;

            string[] parts = getParts(s);
            int broj;
            try
            {
                broj = Int32.Parse(parts[0]);
            }
            catch (Exception)
            {
                return false;
            }
            string podgrupa = parts[1].Trim();

            result = new SifraGrupe(broj, podgrupa);
            return true;
        }
 private Grupa findGrupa(SifraGrupe sifra)
 {
     foreach (Grupa g in grupe)
     {
         if (g.Sifra == sifra)
             return g;
     }
     return null;
 }
Example #8
0
 protected override void saveOriginalData(DomainObject entity)
 {
     Grupa g = (Grupa)entity;
     oldSifra = g.Sifra;
     oldNaziv = g.Naziv;
 }
Example #9
0
 public Grupa(SifraGrupe sifra, string naziv, Kategorija kategorija)
 {
     this.sifra = sifra;
     this.naziv = naziv;
     this.kategorija = kategorija;
 }
Example #10
0
 private MesecnaClanarina findClanarina(SifraGrupe grupa)
 {
     foreach (MesecnaClanarina mc in entities)
     {
         if (mc.Grupa.Sifra == grupa)
             return mc;
     }
     return null;
 }