コード例 #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
ファイル: FrmRoles.cs プロジェクト: chendeben/508-Attendance
 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
ファイル: FrmRoles.cs プロジェクト: chendeben/508-Attendance
 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;
 }