bool IAddressBookInfo.Refuse(ApproveView approveView)
        {
            Contract.Requires <ArgumentNullException>(approveView != null, "参数approveView:不能为空");
            bool result = false;
            MiicConditionCollections condition = approveView.visitor(this);
            string message = string.Empty;
            int    count   = 0;

            try
            {
                result = dbService.UpdateConditions <AddressBookApplicationInfo>(new AddressBookApplicationInfo()
                {
                    ResponseStatus = ((int)ApplyStatusSetting.Refuse).ToString(),
                    ResponseTime   = DateTime.Now
                }, condition, out count, out message);
            }
            catch (Exception ex)
            {
                Config.IlogicLogService.Write(new LogicLog()
                {
                    AppName       = Config.AppName,
                    ClassName     = ClassName,
                    NamespaceName = NamespaceName,
                    MethodName    = MethodBase.GetCurrentMethod().Name,
                    Message       = ex.Message,
                    Oper          = Config.Oper
                });
            }
            if (result == true)
            {
                subitems.RemoveAll(o => o.MyUserID == approveView.ApplicantID && o.AddresserID == approveView.MyUserID);
            }
            return(result);
        }
        bool IAddressBookInfo.Agree(ApproveView approveView)
        {
            Contract.Requires <ArgumentNullException>(approveView != null, "参数approveView:不能为空");
            bool result = false;
            MiicConditionCollections condition = approveView.visitor(this);
            string        message  = string.Empty;
            string        message1 = string.Empty;
            string        message2 = string.Empty;
            List <string> sqls     = new List <string>();

            sqls.Add(DBService.UpdateConditionsSql <AddressBookApplicationInfo>(new AddressBookApplicationInfo()
            {
                ResponseStatus = ((int)ApplyStatusSetting.Agree).ToString(),
                ResponseTime   = DateTime.Now
            }, condition, out message1));
            List <AddressBookInfo> addressBookList = new List <AddressBookInfo>();

            //申请者
            addressBookList.Add(new AddressBookInfo()
            {
                ID                  = Guid.NewGuid().ToString(),
                MyUserID            = approveView.MyUserID,
                AddresserID         = approveView.ApplicantID,
                AddresserName       = approveView.ApplicantName,
                IsBlackList         = ((int)MiicYesNoSetting.No).ToString(),
                CanSeeAddresser     = ((int)MiicYesNoSetting.Yes).ToString(),
                CanSeeAddresserTime = DateTime.Now,
                CanSeeMe            = ((int)MiicYesNoSetting.Yes).ToString(),
                CanSeeMeTime        = DateTime.Now,
                ApplicationTime     = approveView.ApplicationTime,
                JoinTime            = DateTime.Now,
                OftenUsed           = ((int)MiicYesNoSetting.No).ToString()
            });
            //接收者
            addressBookList.Add(new AddressBookInfo()
            {
                ID                  = Guid.NewGuid().ToString(),
                MyUserID            = approveView.ApplicantID,
                AddresserID         = approveView.MyUserID,
                AddresserName       = approveView.MyUserName,
                IsBlackList         = ((int)MiicYesNoSetting.No).ToString(),
                CanSeeAddresser     = ((int)MiicYesNoSetting.Yes).ToString(),
                CanSeeAddresserTime = DateTime.Now,
                CanSeeMe            = ((int)MiicYesNoSetting.Yes).ToString(),
                CanSeeMeTime        = DateTime.Now,
                JoinTime            = DateTime.Now,
                OftenUsed           = ((int)MiicYesNoSetting.No).ToString()
            });
            sqls.Add(DBService.InsertsSql <AddressBookInfo>(addressBookList, out message2));
            try
            {
                result = dbService.excuteSqls(sqls, out message);
            }
            catch (Exception ex)
            {
                Config.IlogicLogService.Write(new LogicLog()
                {
                    AppName       = Config.AppName,
                    ClassName     = ClassName,
                    NamespaceName = NamespaceName,
                    MethodName    = MethodBase.GetCurrentMethod().Name,
                    Message       = ex.Message,
                    Oper          = Config.Oper
                });
            }
            if (result == true)
            {
                subitems.RemoveAll(o => o.MyUserID == approveView.ApplicantID && o.AddresserID == approveView.MyUserID);
            }
            return(result);
        }