Beispiel #1
0
 public void LoadGrid()
 {
     DoWork("加载管理员数据", "加载管理员数据", () =>
     {
         LstManager = client.GetIManagerService().GetList("where UserType=3");
     }, (ex) =>
     {
         if (ex == null)
         {
             gcGSManager.DataSource = LstManager;
         }
     });
 }
 public void LoadGrid()
 {
     DoWork("加载管理员数据", "加载管理员数据", () =>
     {
         LstManager = client.GetIManagerService().GetList("where UserType=2 ORDER BY LoginName ASC, OrgNo ASC");
     }, (ex) =>
     {
         if (ex == null)
         {
             gcManager.DataSource = LstManager;
             gvManager.ExpandAllGroups();
         }
     });
 }
        public void LoadGrid()
        {
            DoWork("加载管理员数据", "加载管理员数据", () =>
            {
                LstManager = client.GetIManagerService().GetList("where UserType=1 ORDER BY ProjectName ASC");
            }, (ex) =>
            {
                if (ex == null)
                {
                    gcXMBMng.DataSource = LstManager;

                    gvXMBMng.RefreshData();
                    gvXMBMng.ExpandAllGroups();
                }
            });
        }
 private void XMBMngSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     bindingSource1.EndEdit();
     if (!norm.Validate())
     {
         return;
     }
     //判断项目和用户是否重复
     if (ExitsUserList.Exists(m => m.LoginName == String.Format("{0}", GpUserSelector.Value) && m.ProjectNo == String.Format("{0}", ProjectSelector.Value)))
     {
         XtraMessageBox.Show("该标段管理员中已存在该用户", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     else
     {
         DoWork("保存数据", "保存数据", () =>
         {
             if (String.IsNullOrEmpty(RefXMBManager.ManagerNo))
             {
                 client.GetIManagerService().Add(RefXMBManager, LoginInfor.LoginName);
             }
             else
             {
                 client.GetIManagerService().Update(RefXMBManager, LoginInfor.LoginName);
             }
         }, (ex) =>
         {
             if (ex == null)
             {
                 if (MainHandler != null)
                 {
                     MainHandler.LoadGrid();
                 }
                 this.Close();
             }
         });
     }
 }