Package urun.pojos

Examples of urun.pojos.UrunStok


    }
    return false;
  }

  private static void addUrunStok(UrunSatis urunSatisBilgi) {
    UrunStok us = (UrunStok) HibernateManager.getInstance()
        .getObjectWithUniqueColumn(UrunStok.class, "barkod",
            urunSatisBilgi.getBarkod());
    if (us != null) {
      us.setAdet(us.getAdet() + 1);
      HibernateManager.getInstance().update(us);
    } else {
      us = new UrunStok(urunSatisBilgi);
      HibernateManager.getInstance().save(us);
    }
  }
View Full Code Here


    List<UrunSatis> bekleyenSatisUrunListesi = (List<UrunSatis>) HibernateManager
        .getInstance().getEntitysList(bekleyenSatisControl,
            "satisListesi");
    for (int i = 0; i < bekleyenSatisUrunListesi.size(); i++) {
      UrunSatis us = bekleyenSatisUrunListesi.get(i);
      UrunStok urunS = (UrunStok) HibernateManager.getInstance()
          .getObjectWithUniqueColumn(UrunStok.class, "barkod",
              us.getBarkod());
      if (urunS == null) {
        urunS = new UrunStok(us);
        HibernateManager.getInstance().save(urunS);
      } else {
        urunS.setAdet(urunS.getAdet() + us.getAdet());
        HibernateManager.getInstance().update(urunS);
      }
    }
  }
View Full Code Here

      cTextFieldBarkodVeyaMiktar.setText("");
      cTextFieldBarkodVeyaMiktar.requestFocus();
      return;
    }

    UrunStok urun = (UrunStok) HibernateManager.getInstance()
        .getObjectWithUniqueColumn(UrunStok.class, "barkod",
            Long.parseLong(urunBarkod));
    if (urun == null) {
      Utils.showMessage("Sistemde barkod numarası " + urunBarkod
          + " olan ürün bulunmamaktadır.");
      cTextFieldBarkodVeyaMiktar.setText("");
      return;
    }

    if (urun.getAdet() < urunAdet) {
      Utils.showMessage("Sistemde ürün miktarı eksiye düşecektir.");
      cTextFieldBarkodVeyaMiktar.setText("");
    }

    if (urunSatisControl(urun)) {
      urunSatis = new UrunSatis(urun, urunAdet);
      urunSatis.isVade(vadeFark);
      urunSatisListesi.add(urunSatis);
    } else {
      urunSatis = findUrunSatis(urun);
      urunSatis.setAdet(urunSatis.getAdet() + urunAdet);
    }
    cTableSatisListesi.setObjects(urunSatisListesi);
    urun.setAdet(urun.getAdet() - urunAdet);
    HibernateManager.getInstance().update(urun);

    tutarDoldur();
    cTextFieldBarkodVeyaMiktar.setText("");
    cTextFieldBarkodVeyaMiktar.requestFocus();
View Full Code Here

    boolean check;
    urunStok = (UrunStok) HibernateManager.getInstance()
        .getObjectWithUniqueColumn(UrunStok.class, "barkod",
            urunSevk.getBarkod());
    if (urunStok == null) {
      urunStok = new UrunStok(urunSevk);
      urunStok.setSystemName(urunSevk.getUrunSevkFrom());
      check = HibernateManager.getInstance().save(urunStok);
    } else {
      urunStok.setAdet(urunStok.getAdet() + urunSevk.getAdet());
      check = HibernateManager.getInstance().update(urunStok);
View Full Code Here

    }
    long urunBarkod = urunSevk.getBarkod();
    boolean check1 = false;
    boolean check = false;
    boolean check2 = false;
    UrunStok urunStokControl = (UrunStok) HibernateManager
        .getInstance()
        .getObjectWithUniqueColumn(UrunStok.class, "barkod", urunBarkod);
    if (urunStokControl == null) {
      UrunStok yeniStok = new UrunStok(urunSevk);
      yeniStok.setSystemName(urunSevk.getUrunSevkTo());
      check = HibernateManager.getInstance().save(yeniStok);
    } else {
      urunStokControl.setAdet(urunStokControl.getAdet()
          + urunSevk.getAdet());
      check2 = HibernateManager.getInstance().update(urunStokControl);
View Full Code Here

TOP

Related Classes of urun.pojos.UrunStok

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.