private void ProvjeraVrsteObracuna(int?id) { Mipsed7.DataAccessLayer.SqlClient database = new Mipsed7.DataAccessLayer.SqlClient(); try { id_vrsta = Convert.ToInt32(database.ExecuteScalar("Select OznakaPodnositelja From JOPPDA Where ID = '" + id + "'")); } catch { id_vrsta = 1; } }
private bool ProvjeraZaMinus(decimal kolicina, decimal stanje) { Mipsed7.DataAccessLayer.SqlClient client = new Mipsed7.DataAccessLayer.SqlClient(); string materijalno = client.ExecuteScalar("Select Distinct Materijalno From Korisnik").ToString(); if (materijalno == "True" & (stanje - kolicina) < 0) { return(true); } return(false); }
private bool ProvjeraNapravljenogJOPPDAZaObracun() { Mipsed7.DataAccessLayer.SqlClient client = new Mipsed7.DataAccessLayer.SqlClient(); try { string var = client.ExecuteScalar("Select ID From JOPPDAObracun Where OBRACUN_ID = '" + drv["idobracun"].ToString() + "' And Vrsta = 0").ToString(); return(false); } catch { return(true); } }