Hi,
I want that my method return list of customer that i have created but the list that appeared is empty, please help me!!!!!!!!!!!!
there is the method that i was implemented :
public ClientTopNet CreationClient(int ID_CLIENT, string LOGIN_CREATION, DateTime DATE_CREATION, string LOGIN_MODIFICATION, DateTime DATE_MODIFICATION, int TYPE_CLIENT, int CIVILITE, string NOM, string PRENOM, string FONCTION, string RS, string CIN, string ADRESSE, string VILLE, int CP, int GOUVERN, string TEL, string GSM, string FAX, string EMAIL, int CD_ORIGINE, string OBSERV, int EXONERE, int EXOTIMBRE, int SECTEUR_ACT, int VIP, string CHARGECOMPTE, string CHARGECOMPTE_RD, int CATEGORIE, string REGISTRE, int METHOD_ENVOI_FACT, int PERSONNEL, string REF_CLIENTCRM)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = @"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=topnet;Initial Catalog=TopnetBase;Data Source=SWEET-4B6F892B4\SQLEXPRESS";
ClientTopNet oClient = new ClientTopNet();
try
{
conn.Open();
int r;
string req = "INSERT INTO client ( ID_CLIENT,LOGIN_CREATION , DATE_CREATION,LOGIN_MODIFICATION ,DATE_MODIFICATION,TYPE_CLIENT, CIVILITE,NOM,PRENOM,FONCTION,RS,CIN,ADRESSE,VILLE, CP, GOUVERN ,TEL,GSM,FAX,EMAIL,CD_ORIGINE,OBSERV,EXONERE,EXOTIMBRE,SECTEUR_ACT ,VIP, CHARGECOMPTE,CHARGECOMPTE_RD ,CATEGORIE,REGISTRE,METHOD_ENVOI_FACT,PERSONNEL,REF_CLIENTCRM )VALUES ('" + ID_CLIENT + "','" + LOGIN_CREATION + "','" + DATE_CREATION + "','" + LOGIN_MODIFICATION + "','" + DATE_MODIFICATION + "','" + TYPE_CLIENT + "','" + CIVILITE + "','" + NOM + "','" + PRENOM + "','" + FONCTION + "','" + RS + "','" + CIN + "','" + ADRESSE + "','" + VILLE + "','" + CP + "','" + GOUVERN + "','" + TEL + "','" + GSM + "','" + FAX + "','" + EMAIL + "','" + CD_ORIGINE + "','" + OBSERV + "','" + EXONERE + "','" + EXOTIMBRE + "','" + SECTEUR_ACT + "','" + VIP + "','" + CHARGECOMPTE + "','" + CHARGECOMPTE_RD + "','" + CATEGORIE + "','" + REGISTRE + "','" + METHOD_ENVOI_FACT + "','" + PERSONNEL + "','" + REF_CLIENTCRM + "')";
System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand(req, conn);
r = command.ExecuteNonQuery();
conn.Close();
return oClient;
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Insert Error:";
msg += ex.Message;
throw new Exception(msg);
}