public UpdateFamily(int idFamily, int idCurrentUser, int _IdSynchro, Stock_admin _FStockAdmin) { InitializeComponent(); ServiceSynchro.ServiceSynchroClient ssc = new ServiceSynchro.ServiceSynchroClient(); ServiceSynchro.User[] Allusers = ssc.GetUsers(false); ServiceSynchro.Family[] Allfamilies = ssc.GetFamilies(false); foreach (ServiceSynchro.Family family in Allfamilies) { if (family.Id == idFamily) { _f = family; } } foreach (ServiceSynchro.User user in Allusers) { if (user.Id == idCurrentUser) { CurrentUser = user; } } IdSynchro = _IdSynchro; FStockAdmin = _FStockAdmin; lbl_titre.Text += " " + _f.Name; }
public AddFamily(int idCurrentUser, int _IdSynchro, Stock_admin _FStockAdmin) { InitializeComponent(); ServiceSynchro.ServiceSynchroClient ssc = new ServiceSynchro.ServiceSynchroClient(); ServiceSynchro.User[] Allusers = ssc.GetUsers(false); foreach (ServiceSynchro.User user in Allusers) { if (user.Id == idCurrentUser) { CurrentUser = user; } } IdSynchro = _IdSynchro; FStockAdmin = _FStockAdmin; }
public UpdateArticle(int idArticle, int idCurrentUser, int _IdSynchro, int idFamily, Stock_admin _fStockAdmin) { InitializeComponent(); ServiceSynchro.ServiceSynchroClient ssc = new ServiceSynchro.ServiceSynchroClient(); ServiceSynchro.User[] Allusers = ssc.GetUsers(false); ServiceSynchro.Article[] Allarticles = ssc.GetArticles(idFamily, false); foreach (ServiceSynchro.Article article in Allarticles) { if (article.Id == idArticle) { _a = article; } } foreach (ServiceSynchro.User user in Allusers) { if (user.Id == idCurrentUser) { CurrentUser = user; } } IdSynchro = _IdSynchro; lbl_titre.Text += " " + _a.Name; txtb_name.Text = _a.Name; txtb_location.Text = _a.LocationCode; nud_quantity.Value = _a.Quantity; StockAdmin = _fStockAdmin; ServiceSynchro.Family[] Families = ssc.GetFamilies(true); //chargement des familles dans la combo int n = 0; int indexToSelect = 0; foreach (ServiceSynchro.Family family in Families) { comboBox_family.Items.Add(family); if (family.Id == idFamily) { indexToSelect = n; } n = n + 1; } comboBox_family.DisplayMember = "name"; comboBox_family.SelectedItem = comboBox_family.Items[indexToSelect]; }
public AddArticle(int idCurrentUser, int _IdSynchro, Stock_admin _FStockAdmin) { InitializeComponent(); ServiceSynchro.ServiceSynchroClient ssc = new ServiceSynchro.ServiceSynchroClient(); ServiceSynchro.User[] Allusers = ssc.GetUsers(false); ServiceSynchro.Family[] Families = ssc.GetFamilies(true); foreach (ServiceSynchro.User user in Allusers) { if (user.Id == idCurrentUser) { CurrentUser = user; } } IdSynchro = _IdSynchro; FStockAdmin = _FStockAdmin; //chargement des familles dans la combo foreach (ServiceSynchro.Family family in Families) { comboBox_family_name.Items.Add(family); } comboBox_family_name.DisplayMember = "name"; }
private void btn_voir_stocks_Click(object sender, EventArgs e) { Stock_admin fStockUserAdmin = new Stock_admin(CurrentUser.Id, IdSynchro); fStockUserAdmin.Show(); }