/// <summary> /// Check if User Exist /// </summary> /// <param name="login">Login </param> /// <param name="password">Password </param> /// <returns>Existance User or Null</returns> private User CheckUser(string login, string password) { // Create UserBLO Instance IGwinBaseBLO userBLO = GwinBaseBLO <User> .CreateBLO_Instance(typeof(User), GwinApp.Instance.TypeBaseBLO); Dictionary <string, object> rechercheInfos = new Dictionary <string, object>(); rechercheInfos.Add(nameof(User.Login), "=" + login); rechercheInfos.Add(nameof(User.Password), "=" + password); List <object> resultat = userBLO.Recherche(rechercheInfos); if (resultat != null && resultat.Count > 0) { return(resultat[0] as User); } else { return(null); } }
private void SelectionFilterManager_ValueChanged(object sender, EventArgs e) { BaseEntity ValueEntity = this.SelectionFilterManager.ValueEntity; Type Type_ValueEntity = ObjectContext.GetObjectType(ValueEntity.GetType()); if (ValueEntity == null) { return; } Type TypeGenericList = this.PropertyInfo.PropertyType.GetGenericArguments()[0]; IGwinBaseBLO ServiceTypeGenericList = this.EntityBAO.CreateServiceBLOInstanceByTypeEntity(TypeGenericList); List <Object> ls_entity_in_filter = ServiceTypeGenericList.Recherche( new Dictionary <string, object>() { { Type_ValueEntity.Name, ValueEntity.Id } }); listBoxChoices.Items.AddRange(ls_entity_in_filter.ToArray()); }
private void SelectionFilterManager_ValueChanged(object sender, EventArgs e) { BaseEntity ValueEntity = this.SelectionFilterManager.ValueEntity; Type Type_ValueEntity = ObjectContext.GetObjectType(ValueEntity.GetType()); if (ValueEntity == null) { return; } IGwinBaseBLO FieldBLO = this.Service.CreateServiceBLOInstanceByTypeEntity(this.PropertyInfo.PropertyType); List <Object> ls_data = FieldBLO.Recherche( new Dictionary <string, object>() { { Type_ValueEntity.Name, ValueEntity.Id } }); this.DataSource = ls_data; }
private void SelectionFilterManager_ValueChanged(object sender, EventArgs e) { BaseEntity ValueEntity = this.SelectionFilterManager.ValueEntity; Type Type_ValueEntity = ObjectContext.GetObjectType(ValueEntity.GetType()); if (ValueEntity == null) return; IGwinBaseBLO FieldBLO = this.Service.CreateServiceBLOInstanceByTypeEntity(this.PropertyInfo.PropertyType); List<Object> ls_data = FieldBLO.Recherche( new Dictionary<string, object>() { { Type_ValueEntity.Name, ValueEntity.Id } }); this.DataSource = ls_data; // if Data not exisit , we empty the field if (ls_data.Count == 0) this.TextCombobox = ""; // onValueChanged(this, null); }