private void Sortee_aysnc_DoWork(object sender, DoWorkEventArgs e) { sqlcn sqlConnection = new sqlcn(); SqlParameter[] param = new SqlParameter[6]; param[0] = new SqlParameter("@ArticleId", SqlDbType.Int); param[0].Value = item.Id; param[1] = new SqlParameter("@Quontitier", SqlDbType.Int); param[1].Value = int.Parse(quantitie.Text); param[2] = new SqlParameter("@date_sortie", SqlDbType.Date); param[2].Value = gunaDateTimePicker1.Value.ToString(); param[3] = new SqlParameter("@matricul", SqlDbType.VarChar, 40); param[3].Value = matricule.Text.ToString(); param[4] = new SqlParameter("@ClientId", SqlDbType.Int); param[4].Value = int.Parse(ClientId.Text); param[5] = new SqlParameter("@Quantity", SqlDbType.Int); param[5].Value = int.Parse(quantitie.Text); e.Result = sqlConnection.ExuteCommende("r_Artical_Sortee", param); }
private void ArticleSorieView_DoWork(object sender, DoWorkEventArgs e) { sqlcn SqlConnection = new sqlcn(); SqlDataReader datareader = SqlConnection.Data_View(e.Argument.ToString()); List <Articl_sortie> data = new List <Articl_sortie>(); while (datareader.Read()) { Articl_sortie item = new Articl_sortie(); item.Id = (int)datareader.GetValue(0); item.Codeclient = (int)datareader.GetValue(2); item.Date_sortie = (DateTime)datareader.GetValue(3); item.Matricul = (String)datareader.GetValue(4); item.Quontitier1 = (int)datareader.GetValue(5); item.Barcode1 = (String)datareader.GetValue(7); item.Bon_entrer = (int)datareader.GetValue(8); item.Nom = (String)datareader.GetValue(9); item.Description_inter = (String)datareader.GetValue(11); item.Descroption_fabrication = (String)datareader.GetValue(12); item.Code_fabrication = (String)datareader.GetValue(13); item.Prix = (double)datareader.GetValue(14); item.Date_entre = (DateTime)datareader.GetValue(16); item.Img = (Byte[])datareader.GetValue(17); data.Add(item); // data.Add(new article_model((int)datareader.GetValue(0), (String)datareader.GetValue(1),(String) datareader.GetValue(2),(String) datareader.GetValue(3), (String)datareader.GetValue(4), (String)datareader.GetValue(5),(float) datareader.GetValue(6), (int)datareader.GetValue(7), (DateTime)datareader.GetValue(8),(byte[]) datareader.GetValue(9))); } e.Result = data; }
private void update_DoWork(object sender, DoWorkEventArgs e) { model_client model = ((model_client)e.Argument); sqlcn sql = new sqlcn(); sql.update(model); e.Result = model; }
private void update_data_DoWork(object sender, DoWorkEventArgs e) { article_model model = ((article_model)e.Argument); sqlcn sql = new sqlcn(); sql.update(model); e.Result = model; }
private void update_DoWork(object sender, DoWorkEventArgs e) { fourniseur_model model = ((fourniseur_model)e.Argument); sqlcn sql = new sqlcn(); MessageBox.Show(model.ToString()); sql.update(model); e.Result = model; }
private void update_data_DoWork_DoWork(object sender, DoWorkEventArgs e) { equipement_model model = ((equipement_model)e.Argument); sqlcn sql = new sqlcn(); MessageBox.Show(model.Ref + "" + model.CODE + "" + model.Nom_equipment + "" + model.Matrucil); sql.update(model); e.Result = model; }
private void back_fourniseur_view_DoWork(object sender, DoWorkEventArgs e) { sqlcn SqlConnection = new sqlcn(); e.Result = SqlConnection.Viewfourniseur(e.Argument.ToString()); }
private void background_view_DoWork(object sender, DoWorkEventArgs e) { sqlcn SqlConnection = new sqlcn(); e.Result = SqlConnection.ViewClient(e.Argument.ToString()); }
private void worker_back_view_DoWork(object sender, DoWorkEventArgs e) { sqlcn SqlConnection = new sqlcn(); e.Result = SqlConnection.Viewequipe(e.Argument.ToString()); }
/* * get data from databse and asing it to a class object * data retrived depends on the query given in the argumtens */ private List <article_model> loaddata(String query) { sqlcn SqlConnection = new sqlcn(); return(SqlConnection.View(query)); }