예제 #1
0
        ///// <summary>
        ///// 根据名称查找对象(自定义接口使用范例)
        ///// </summary>
        //public List<RoleInfo> FindByName(string name)
        //{
        //    List<RoleInfo> result = new List<RoleInfo>();

        //    IRoleService service = CreateSubClient();
        //    ICommunicationObject comm = service as ICommunicationObject;
        //    comm.Using(client =>
        //    {
        //        result = service.FindByName(name);
        //    });

        //    return result;
        //}

        public void AddFunction(int functionID, int roleID)
        {
            IRoleService         service = this.CreateSubClient();
            ICommunicationObject comm    = service as ICommunicationObject;

            comm.Using(client =>
            {
                service.AddFunction(functionID, roleID);
            });
        }