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(); } }
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(); } } }