예제 #1
0
 public void Init()
 {
     RoleBll bll = new RoleBll(LJH.Attendance.Model.AppSettings.CurrentSetting.ConnectUri);
     this.DataSource = bll.GetAllRoles().QueryObjects;
     this.DisplayMember = "Name";
     this.ValueMember = "ID";
     this.DropDownStyle = ComboBoxStyle.DropDownList;
 }
예제 #2
0
 protected override List<object> GetDataSource()
 {
     RoleBll roleBll = new RoleBll(AppSettings.CurrentSetting.ConnectUri);
     roles = roleBll.GetAllRoles().QueryObjects.ToList();
     List<object> source = new List<object>();
     foreach (object o in roles)
     {
         source.Add(o);
     }
     return source;
 }
예제 #3
0
 protected override bool DeletingItem(object item)
 {
     RoleBll bll = new RoleBll(AppSettings.CurrentSetting.ConnectUri);
     Role info = (Role)item;
     CommandResult result = bll.Delete(info);
     if (result.Result != ResultCode.Successful)
     {
         MessageBox.Show(result.Message,LJH.Attendance.UI.Properties.Resources.Form_Alert, MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     return result.Result == ResultCode.Successful;
 }