public KInvStavka(string _id, DateTime _vremUpisa, Roba _roba, decimal _kol, string _lokOznaka) { this.id = _id; this.vremUpisa = _vremUpisa; this.roba = _roba; this.kolicina = _kol; this.lokOznaka = _lokOznaka; }
public RobnaLokacija(Roba _roba, string _lokOznaka, string _zonOznaka, decimal _stanje, decimal _kapacitet) { this.roba = _roba; this.lokOznaka = _lokOznaka; this.zonOznaka = _zonOznaka; this.stanje = _stanje; this.kapacitet = _kapacitet; }
public StavkaNaloga(Roba _roba, decimal _zadaniPromet, decimal _skenPromet, string _optiLok, string _optiZon) { this.roba = _roba; this.zadaniPromet = _zadaniPromet; this.skeniraniPromet = _skenPromet; this.optiLok = _optiLok; this.optiZon = _optiZon; }
public Roba DohvatiRobu(string _barkod) { Roba entity = null; try { using (MTrenisDataContext dc = new MTrenisDataContext(ConfigurationManager.ConnectionStrings["MTrenisConn"].ConnectionString)) { var r = ( from ware in dc.Wares join wb in dc.WareBarcodes on ware.MobRoba_Sifra equals wb.MobRoba_Sifra where wb.MobRobaCode_BarCode == _barkod select new { sifra = ware.MobRoba_Sifra.TrimEnd(), naziv = ware.MobRoba_Naziv.TrimEnd(), dobavljac = ware.MobRoba_SifraDob.TrimEnd() }).Single(); entity = new Roba(r.sifra, r.naziv, r.dobavljac); } } catch (SqlException e) { throw new FaultException<MTrenisKvar>(new MTrenisKvar(e.Number, e.Message), P.FAULT_R_MSSQL_ERR); } catch (InvalidOperationException e) { throw new FaultException<MTrenisKvar>(new MTrenisKvar(P.UNKNOWN_BARCODE_ERR_CODE, String.Format(P.UNKNOWN_BARCODE_ERR_DESC, _barkod) + e.Message), P.FAULT_R_LINQ_ERR); } catch (Exception e) { throw new FaultException<MTrenisKvar>(new MTrenisKvar(P.GENERAL_ERR_CODE, e.Message), P.FAULT_R_GENERAL_ERR); } return entity; }