//Enregistrement de la taxe due //============================= public void Enregistrer_Taxe_due(BaseImposable tx) { DBConnection con = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); con.Execute_Query("INSERT INTO taxe_due " + "(" + "nature, " + "id, " + "prov," + "town_dist," + "commune," + "quarter_sect," + "avenue_loc," + "number," + "tax_id," + "rate," + "id_user," + "saving_date" + ")" + "VALUES(" + "'" + tx.nature + "', " + "'" + tx.id + "', " + "'" + tx.prov.Replace("'", "''") + "', " + "'" + tx.town_dist.Replace("'", "''") + "', " + "'" + tx.commune.Replace("'", "''") + "', " + "'" + tx.quarter_sect.Replace("'", "''") + "', " + "'" + tx.avenue_loc.Replace("'", "''") + "', " + "'" + tx.number + "', " + "'" + tx.tax_id + "', " + "" + tx.rate + "," + "'" + tx.id_user + "', " + "getDate() " + ")" ); }
/************************************ * Enregistrement Feuille de Calcul * =================================*/ public void EnregistrerFeuille_Calcul(BaseImposable feuille) { DBConnection con = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); con.Execute_Query("SET DATEFORMAT DMY INSERT INTO Feuille_Calcul " + "(" + "id_feuille, " + "datef, " + "userID " + ")" + "VALUES(" + "'" + feuille.id_feuille + "', " + "'" + feuille.datef + "', " + "'" + feuille.id_user + "' " + ")" ); }
//Enregistrement de la taxe //========================= public void EnregistrerTaxe(BaseImposable tx) { DBConnection con = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); con.Execute_Query("INSERT INTO tax ( " + "(" + "tax_id, " + "tax_name, " + "generating_fact," + "periodicity" + ")" + "VALUES(" + "'" + tx.tax_id + "'," + "'" + tx.tax_name.Replace("'", "''") + "'," + "'" + tx.generating_fact.Replace("'", "''") + "'," + "'" + tx.periodicity + "'" + ")" ); }
//ENREGISTREMENT IMPOSITION FEUILLE public void EnregistrementImpositionFeuille(BaseImposable bas) { DBConnection cnx = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); cnx.Execute_Query("Insert into Imposition_Feuille " + "(nature, " + "id, " + "prov, " + "town_dist, " + "commune, " + "quarter_sect, " + "avenue_loc, " + "number, " + "tax_id, " + "id_feuille, " + "Montant, " + "Monnaie, " + "Observation " + ") " + "values " + "('" + bas.nature + "', " + "'" + bas.id + "', " + "'" + bas.prov + "', " + "'" + bas.town_dist + "', " + "'" + bas.commune + "', " + "'" + bas.quarter_sect + "', " + "'" + bas.avenue_loc + "', " + "'" + bas.number + "', " + "'" + bas.tax_id + "', " + "'" + bas.id_feuille + "', " + "'" + bas.Montant + "', " + "'" + bas.Monnaie + "', " + "'" + bas.Observation + "' " + ") " + ""); }
//Enregistrement de la base imposable //=================================== public void EnregistrerActivite(BaseImposable act) { DBConnection con = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); con.Execute_Query(" SET DATEFORMAT DMY Exec EnregistrerBaseImposable @nat='" + act.nature.Replace("'", "''") + "',@ass='" + act.id + "',@prov='" + act.prov.Replace("'", "''") + "',@vill='" + act.town_dist.Replace("'", "''") + "',@com='" + act.commune.Replace("'", "''") + "',@quart='" + act.quarter_sect.Replace("'", "''") + "',@aven='" + act.avenue_loc.Replace("'", "''") + "',@idinsp='" + act.inspector_id + "',@num='" + act.number + "',@mes=" + act.sizeAct + ",@unit='" + act.unity + "',@enseig='" + act.signboard + "',@datesav='" + DateTime.Now + "',@iduser='******',@datrec='" + act.datecensus + "'"); }
//Enregistrement de la nature base_imposable //========================================== public void EnregistrerNatureActivite(BaseImposable act) { DBConnection con = new DBConnection(System.Web.HttpContext.Current.Server.MapPath("~\\bin\\connexion.xml")); con.Execute_Query("INSERT INTO nature_base_imposable (nature,id_user,saving_date) values ('" + act.nature.Replace("'", "''") + "','" + act.id_user + "',getdate())"); }