Exemplo n.º 1
0
        private void AddAllExecute()
        {
            List <UserDuty> lsUserDuty = new List <UserDuty>();

            foreach (var item in UnAllocateDutyList)
            {
                UserDuty ud = new UserDuty();
                ud.UserID = UserID;
                ud.DutyID = item.DutyId;
                lsUserDuty.Add(ud);
            }
            FundsRegulatoryClient.UserDutyManagerSrv.UserDuty[] userdutys = lsUserDuty.ToArray();
            if (UserDutyManagerClient.Current.LicendToUser(userdutys) == "1")
            {
                InitialData();
            }
        }
Exemplo n.º 2
0
        private void AddExecute(object obj)
        {
            System.Collections.IList SelectedItems = obj as System.Collections.IList;
            if (SelectedItems != null)
            {
                List <UserDuty> lsUserDuty = new List <UserDuty>();
                foreach (var item in SelectedItems)
                {
                    DutyModel dm = (DutyModel)item;
                    UserDuty  ud = new UserDuty();
                    ud.UserID = UserID;
                    ud.DutyID = dm.DutyId;
                    lsUserDuty.Add(ud);
                }

                FundsRegulatoryClient.UserDutyManagerSrv.UserDuty[] userdutys = lsUserDuty.ToArray();
                if (UserDutyManagerClient.Current.LicendToUser(userdutys) == "1")
                {
                    InitialData();
                }
            }
        }