Beispiel #1
0
        public static void Update(Guid companyId, Account account, string operatorAccount)
        {
            var repository = Factory.CreateAccountRepository();

            repository.Save(companyId, account);

            if (account.Type == AccountType.Receiving)
            {
                //将此账号设置为VIP账户
                AccountBaseService.SetVipAccount(account.No);
            }

            var companysrv = SMSCompanySmsParamService.Query(account.Type, companyId);

            if (companysrv == null)
            {
                var company = CompanyService.GetCompanyInfo(companyId);
                var emp     = EmployeeService.QueryCompanyAdmin(companyId);
                //绑定收款账号
                SMSCompanySmsParamService.SaveAccount(new ChinaPay.SMS.Service.Domain.CompanySmsParam()
                {
                    AccountNo = account.No, CompanyId = company.Id, CompanyName = company.AbbreviateName, CompanyType = company.Type, CompanyNo = emp.Login, AccountType = AccountType.Receiving
                });
            }
            else
            {
                companysrv.AccountNo = account.No;
                //修改收付款账号绑定
                SMSCompanySmsParamService.UpdateAccount(companysrv);
            }

            // 记录日志
            saveAddLog("收/付款账号", string.Format("账号:{0},账号类型:{1},是否有效:{2},账号绑定时间:{3}", account.No, account.Type.GetDescription(), account.Valid == true ? "是" : "否", account.Time.ToString()), account.No, operatorAccount);
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RegisterOEMSkins("form.css");
     RegisterOEMSkins("page.css");
     RegisterOEMSkins("register.css");
     if (!IsPostBack)
     {
         var obj = SMSCompanySmsParamService.Query(AccountType.Payment, CurrentCompany.CompanyId);
         if (obj != null)
         {
             //if ((obj.B3BReceiveSms & CompanyB3BReceiveSms.AccountBinding) == CompanyB3BReceiveSms.AccountBinding)
             //{
             //    chkBang.Checked = true;
             //}
             if ((obj.B3BReceiveSms & CompanyB3BReceiveSms.FlightChanges) == CompanyB3BReceiveSms.FlightChanges)
             {
                 chkBina.Checked = true;
             }
             if ((obj.B3BReceiveSms & CompanyB3BReceiveSms.Ticket) == CompanyB3BReceiveSms.Ticket)
             {
                 chkChupiao.Checked = true;
             }
         }
     }
 }