示例#1
0
        public void AddCikkToGrid()
        {
            var ruha = new Munkaruha()
            {
                Cikkszam = Number, Mennyiseg = int.Parse(Count), Id = this.Id, Mertekegyseg = Unit, Cikknev = CikkName, Egysegar = int.Parse(Price), Partner = this.Partner
            };

            Ruhak.Add(ruha);
            Number = string.Empty; Count = string.Empty; Unit = string.Empty; CikkName = string.Empty; Price = string.Empty;
            NotifyOfPropertyChange(() => Ruhak);
            NotifyOfPropertyChange(() => Sum);
            Max     = 0;
            Partner = "";
        }
示例#2
0
        public void AddCikkToGrid()
        {
            if (!CheckAllData())
            {
                return;
            }
            int Price = int.Parse(this.Price);
            int Count = int.Parse(this.Count);
            var ruha  = new Munkaruha()
            {
                Cikkszam = Number, Mennyiseg = Count, Id = this.Id, Mertekegyseg = Unit, Cikknev = Nev, Egysegar = Price, Partner = Partner.Name, PartnerId = Partner.Id, Szamlaszam = this.Szamlaszam
            };

            Ruhak.Add(ruha);
            Number = string.Empty; this.Count = string.Empty; Unit = string.Empty; Nev = string.Empty; this.Price = string.Empty;
            NotifyOfPropertyChange(() => Ruhak);
            NotifyOfPropertyChange(() => Sum);
            SzamlaSzamIsEnabled = false;
            PartnerIsEnabled    = false;
        }
示例#3
0
        public void AddCikkToGrid()
        {
            if (Count == null || Count == string.Empty || int.Parse(Count) < 1)
            {
                MessageBox.Show("Hibás mennyiség!");
                return;
            }
            if (Max - int.Parse(Count) < 0)
            {
                MessageBox.Show("Több mennyiséget nem adhatsz ki mint amennyi a raktárban van !");
                return;
            }
            var ruha = new Munkaruha()
            {
                Cikkszam = Number, Mennyiseg = int.Parse(Count), Id = this.Id, Mertekegyseg = Unit, Cikknev = CikkName, Egysegar = int.Parse(Price), Partner = this.Partner
            };

            Ruhak.Add(ruha);
            Number = string.Empty; Count = string.Empty; Unit = string.Empty; CikkName = string.Empty; Price = string.Empty;
            NotifyOfPropertyChange(() => Ruhak);
            NotifyOfPropertyChange(() => Sum);
            Max     = 0;
            Partner = "";
        }