public MetierClient(String Code) { Codec = Code; metier met = Program.met; String sql = "SELECT * from client where codes = '" + Program.Societe + "' and codee = '" + Program.Exercice + "' and code = '" + Code + "' "; DataSet ds = met.recuperer_table(sql, "client"); if (ds != null) { if (ds.Tables.Count != 0) { if (ds.Tables["client"].Rows.Count != 0) { DataRow dr = ds.Tables["client"].Rows[0]; Double.TryParse(dr["remise"] + "", out RemiseFixeClient); Double.TryParse(dr["plafond"] + "", out PlafondCreditClient); RegimeClient = (Boolean)dr["regime"]; TimbreFactClient = (Boolean)dr["timbre"]; ExenorationClient = (Boolean)dr["exenoration"]; CumulRemiseClient = (Boolean)dr["cumulrem"]; NomC = dr["libelle"] + ""; adrc = dr["adrl"] + ""; Comptant = false; } } } }
public MetierRep(String Code) { this.CodeR = Code; metier met = Program.met; String sql = "SELECT * from rep where codes = '" + Program.Societe + "' and codee = '" + Program.Exercice + "' and code = '" + Code + "' "; DataSet ds = met.recuperer_table(sql, "rep"); if (ds != null) { if (ds.Tables.Count != 0) { if (ds.Tables["rep"].Rows.Count != 0) { DataRow dr = ds.Tables["rep"].Rows[0]; Double.TryParse(dr["taux"] + "", out TauxComRep); NomR = dr["libelle"] + ""; AdrR = dr["adrf"] + ""; } } } }
public MetierFour(String Code) { metier met = Program.met; String sql = "SELECT * from four where codes = '" + Program.Societe + "' and codee = '" + Program.Exercice + "' and code = '" + Code + "' "; DataSet ds = met.recuperer_table(sql, "four"); if (ds != null) { if (ds.Tables.Count != 0) { if (ds.Tables["four"].Rows.Count != 0) { DataRow dr = ds.Tables["four"].Rows[0]; FodecFactFour = (Boolean)dr["fodecfact"]; TimbreFactFour = (Boolean)dr["timbre"]; Codec = dr["code"] + ""; Nomc = dr["libelle"] + ""; Adrc = dr["adrf"] + ""; } } } }