Exemplo n.º 1
0
 public void Add(
     int partitionId,
     long?emailSenderUserId,
     string @from,
     string[] to,
     string[] copyTo,
     string subject,
     string body,
     bool isBodyHtml,
     byte[] files)
 {
     _executor.Execute(
         "[dbo].[EmailMessage_Add]",
         new
     {
         State = EmailMessageState.New,
         partitionId,
         @from,
         To     = EmailMessageData.Join(to),
         CopyTo = EmailMessageData.Join(copyTo),
         subject,
         body,
         isBodyHtml,
         files,
         emailSenderUserId
     });
 }
Exemplo n.º 2
0
 public void Add(CalculationData data, long applicationId)
 {
     _executor.Execute("[dbo].[Calculation_Add]", new
     {
         data.ClientId,
         ApplicationHistoryId = applicationId,
         data.AirWaybillDisplay,
         data.ApplicationDisplay,
         data.MarkName,
         data.Weight,
         data.TariffPerKg,
         data.ScotchCost,
         data.InsuranceRate,
         data.FactureCost,
         data.FactureCostEx,
         data.TransitCost,
         data.PickupCost,
         data.FactoryName,
         data.CreationTimestamp,
         ClassId = data.Class,
         data.Count,
         data.Invoice,
         data.Value,
         data.Profit,
         data.TotalTariffCost
     });
 }
Exemplo n.º 3
0
        public long Add(StateEditData data)
        {
            using (var scope = new TransactionScope())
            {
                var id = _executor.Query <long>("[dbo].[State_Add]",
                                                new
                {
                    data.Name,
                    data.Position,
                    IsSystem = false,
                });

                _executor.Execute("[dbo].[StateLocalization_Merge]",
                                  new
                {
                    Name = data.LocalizedName,
                    TwoLetterISOLanguageName = data.Language,
                    StateId = id
                });

                scope.Complete();

                return(id);
            }
        }
Exemplo n.º 4
0
        public void SetStateAvailabilities(long stateId, RoleType[] roles)
        {
            if (roles == null)
            {
                throw new ArgumentNullException("roles");
            }

            var table = TableParameters.GeIdsTable("Roles", roles.Select(x => (long)x).ToArray());

            _executor.Execute("[dbo].[State_SetStateAvailabilities]", new TableParameters(new { stateId }, table));
        }
Exemplo n.º 5
0
 public void Add(int partitionId, long?userId, EventType type, EventState state, byte[] data)
 {
     _executor.Execute(
         "[dbo].[Event_Add]",
         new
     {
         EventTypeId = type,
         data,
         StateId = state,
         partitionId,
         userId
     });
 }
Exemplo n.º 6
0
 public void Update(long id, string name, string email, string phone, string contact, string address, string login)
 {
     _executor.Execute("[dbo].[Carrier_Update]", new
     {
         id,
         name,
         login,
         email,
         phone,
         contact,
         address
     });
 }
Exemplo n.º 7
0
 public void AddToHistory(long clientId, decimal balance, decimal money, EventType type, DateTimeOffset timestamp,
                          string comment, bool isCalculation)
 {
     _executor.Execute("[dbo].[ClientBalanceHistory_Add]", new
     {
         clientId,
         balance,
         money,
         EventTypeId = type,
         timestamp,
         comment,
         isCalculation
     });
 }
Exemplo n.º 8
0
 public void Update(long senderId, SenderData data)
 {
     _executor.Execute("[dbo].[Sender_Update]", new
     {
         id = senderId,
         data.Login,
         data.Name,
         data.Email,
         data.TariffOfTapePerBox,
         TwoLetterISOLanguageName = data.Language,
         data.Contact,
         data.Phone,
         data.Address
     });
 }
Exemplo n.º 9
0
 public void AddOrReplace(long applicationId, BillData data)
 {
     _executor.Execute("[dbo].[Bill_AddOrReplace]",
                       new
     {
         applicationId,
         data.Accountant,
         data.Bank,
         data.BIC,
         data.Client,
         data.CorrespondentAccount,
         data.Count,
         data.CurrentAccount,
         data.Goods,
         data.Head,
         data.HeaderText,
         data.Payee,
         data.Price,
         data.Shipper,
         data.TaxRegistrationReasonCode,
         data.TIN,
         data.VAT,
         data.EuroToRuble,
         data.Number,
         data.SaveDate,
         data.SendDate
     });
 }
Exemplo n.º 10
0
 public void SetForEvent(EventType eventType, string language, bool enableEmailSend, EmailTemplateLocalizationData localization)
 {
     _executor.Execute("[dbo].[EmailTemplate_MergeEvent]", new
     {
         EventTypeId = eventType,
         localization.Body,
         localization.IsBodyHtml,
         localization.Subject,
         TwoLetterISOLanguageName = language,
         enableEmailSend
     });
 }
Exemplo n.º 11
0
 public void Update(long id, string englishName, string russianName, int position)
 {
     _executor.Execute("[dbo].[Country_Update]", new { englishName, russianName, position, id });
 }
Exemplo n.º 12
0
        public void Set(EventType eventType, RoleType[] recipients)
        {
            var table = TableParameters.GeIdsTable("Recipients", recipients.Select(x => (long)x).ToArray());

            _executor.Execute("[dbo].[EventEmailRecipient_Set]", new TableParameters(new { EventTypeId = eventType }, table));
        }
Exemplo n.º 13
0
 public void Update(long id, string name, string login, string email)
 {
     _executor.Execute("[dbo].[Forwarder_Update]", new { id, name, login, email });
 }
Exemplo n.º 14
0
 public void Update(TransitData transit)
 {
     _executor.Execute("[dbo].[Transit_Update]", transit);
 }
Exemplo n.º 15
0
 public void SetLanguage(long userId, string language)
 {
     _executor.Execute("[dbo].[User_SetLanguage]", new { userId, language });
 }
Exemplo n.º 16
0
 public void Delete(long id)
 {
     _executor.Execute("[dbo].[AwbFile_Delete]", new { id });
 }
Exemplo n.º 17
0
 public void SetClientContract(long clientId, string name, byte[] data)
 {
     _executor.Execute("[dbo].[ClientContract_Merge]", new { clientId, name, data });
 }