Exemple #1
0
        public static void AuditNetPay(int soSysNo)
        {
            NetPayV31 message = new NetPayV31
            {
                Header = ServiceAdapterHelper.ApplyMessageHeader(),
                Body   = new NetPayMessage {
                    SOSysNo = soSysNo
                }
            };


            IMaintainNetPayV31 service = ServiceBroker.FindService <IMaintainNetPayV31>();


            try
            {
                //SimpleTypeDataContract<bool> BatchApproveGroupBuy(NetPayV31 msg);
                SimpleTypeDataContract <bool> ResultMsg = service.BatchApproveGroupBuy(message);

                ServiceAdapterHelper.DealServiceFault(ResultMsg.Faults);
            }
            finally
            {
                ServiceBroker.DisposeService <IMaintainNetPayV31>(service);
            }
        }
Exemple #2
0
        public DataGridProfileDataV40 GetDataGridProfileItems(SimpleTypeDataContract <string> guid)
        {
            DataGridProfileDataV40 result = new DataGridProfileDataV40()
            {
                Header = guid.Header,
                Body   = new List <DataGridProfileItemMsg>()
            };
            List <ProfileItem> profileItems = new ProfileBiz().GetDataGridProfileItems(guid.Value);

            if (profileItems != null && profileItems.Count > 0)
            {
                List <string> userIds = new List <string>();
                foreach (var item in  profileItems)
                {
                    userIds.Add(item.InUser);
                }

                var userList = new KeystoneAuthService().BatchGetUserInfo(userIds);
                int i        = 0;
                foreach (var item in profileItems)
                {
                    result.Body.Add(new DataGridProfileItemMsg
                    {
                        Owner = userList.Body[i],
                        DataGridProfileXml = item.ProfileValue
                    });
                    i++;
                }
            }
            return(result);
        }
Exemple #3
0
        /// <summary>
        /// 更新订单
        /// </summary>
        /// <param name="soSysNo"></param>
        public static void UpdateSO4GroupBuying(int soSysNo)
        {
            SimpleTypeDataContract <int> SysNo = new SimpleTypeDataContract <int>
            {
                Value  = soSysNo,
                Header = ServiceAdapterHelper.ApplyMessageHeader()
            };


            IMaintainSOV31 service = ServiceBroker.FindService <IMaintainSOV31>();

            try
            {
                DefaultDataContract msg = service.UpdateSO4GroupBuying(SysNo);
                ServiceAdapterHelper.DealServiceFault(msg.Faults);
            }
            finally
            {
                ServiceBroker.DisposeService <IMaintainSOV31>(service);
            }
        }
Exemple #4
0
        public DefaultDataContract Save(SimpleTypeDataContract <List <UserProfile> > contract)
        {
            var biz = new ProfileBiz();

            foreach (var userProfile in contract.Value)
            {
                var entity = biz.GetProfile(new ProfileQueryEntity
                {
                    ApplicationId = userProfile.ApplicationId,
                    InUser        = userProfile.InUser,
                    ProfileType   = userProfile.Key
                });

                if (entity == null)
                {
                    entity = new ProfileEntity
                    {
                        ApplicationId = userProfile.ApplicationId,
                        InUser        = userProfile.InUser,
                        ProfileType   = userProfile.Key,
                        ProfileValue  = userProfile.Data
                    };

                    biz.Create(entity);
                }
                else
                {
                    entity.ProfileValue = userProfile.Data;
                    entity.InDate       = DateTime.Now;

                    biz.Update(entity);
                }
            }

            return(new DefaultDataContract {
                Header = contract.Header
            });
        }
Exemple #5
0
        public static void CreateAO(int soSysNo)
        {
            FinanceIncomeV31 message = new FinanceIncomeV31
            {
                Header = ServiceAdapterHelper.ApplyMessageHeader(),
                Body   = new FinanceIncomeMessage()
            };

            message.Body.SOIncome = new SOIncomeMessage
            {
                OrderSysNo = soSysNo
            };

            message.Body.SOIncomeRefund = new SOIncomeRefundMessage
            {
                Note          = "团购订单作废",
                RefundReason  = null,
                RefundPayType = SOIncomeRefundPayType.PrepayRefund
            };

            message.Body.Type = FinanceIncomeType.AO;


            ICreateSOIncomeRefundV31 service = ServiceBroker.FindService <ICreateSOIncomeRefundV31>();


            try
            {
                SimpleTypeDataContract <bool> ResultMsg = service.CreateNegativeFinanceIncome(message);

                ServiceAdapterHelper.DealServiceFault(ResultMsg.Faults);
            }
            finally
            {
                ServiceBroker.DisposeService <ICreateSOIncomeRefundV31>(service);
            }
        }