Ejemplo n.º 1
0
        public static void SaveManagerPrize(List <LadderManagerhistoryEntity> list, MailinfoDataSet.Mail_InfoDataTable mailInfoDataTable, string zoneId = "")
        {
            var connectionString = ConnectionFactory.Instance.GetConnectionString(zoneId, EnumDbType.Main);
            var ladderTable      = BuildManagerPrizeTable(list);

            using (SqlConnection conn = new SqlConnection(connectionString))
            {
                conn.Open();
                SqlTransaction trans = conn.BeginTransaction();
                try
                {
                    SaveManagerPrize(ladderTable, trans);
                    MailSqlHelper.SaveMailBulk(mailInfoDataTable, trans);
                    trans.Commit();
                }
                catch (Exception ex)
                {
                    trans.Rollback();
                    throw ex;
                }
                finally
                {
                    conn.Close();
                }
            }
        }
Ejemplo n.º 2
0
 public static bool SaveMailBulk(MailinfoDataSet.Mail_InfoDataTable mailInfoData, SqlTransaction trans)
 {
     if (mailInfoData == null)
     {
         return(false);
     }
     SqlBatchHelper.BulkInsert(trans, mailInfoData);
     return(true);
 }
Ejemplo n.º 3
0
 public static bool SaveMailBulk(MailinfoDataSet.Mail_InfoDataTable mailInfoData, string connectionstring)
 {
     if (mailInfoData == null)
     {
         return(false);
     }
     SqlBatchHelper.BulkInsert(connectionstring, mailInfoData);
     return(true);
 }
Ejemplo n.º 4
0
 public static bool SaveMailBulk(MailinfoDataSet.Mail_InfoDataTable mailInfoData)
 {
     if (mailInfoData == null)
     {
         return(false);
     }
     SqlBatchHelper.BulkInsert(ConnectionFactory.Instance.GetDefault(), mailInfoData);
     return(true);
 }