Ejemplo n.º 1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Model.SmsTaskA model, int iResult, string strSpMsgID, string strStatusStr)
 {
     model.PhoneList = model.PhoneList.Substring(0, model.PhoneList.Length - 1);
     model.FeeNum    = model.MobileNum * model.SingleMobileFee +
                       model.UnicomNum * model.SingleUnicomFee +
                       model.TelecomNum * model.SingleTelecomFee +
                       model.ChinaNum * model.SingleChinaFee;
     return(dal.Add(model, iResult, strSpMsgID, strStatusStr));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Model.SmsTaskA model, int iSendResult, string strSpMsgID, string strStatusStr)
 {
     try
     {
         MyDataBase.db.Insert(SmsPlatForm.SmsHistory)
         .AddColumn(SmsPlatForm.SmsHistory.PhoneList, model.PhoneList)
         .AddColumn(SmsPlatForm.SmsHistory.MsgContent, model.MsgContent)
         .AddColumn(SmsPlatForm.SmsHistory.SubTime, model.SubTime)
         .AddColumn(SmsPlatForm.SmsHistory.SendTime, DateTime.Now)
         .AddColumn(SmsPlatForm.SmsHistory.UserID, model.UserID)
         .AddColumn(SmsPlatForm.SmsHistory.ParentID, model.ParentID)
         .AddColumn(SmsPlatForm.SmsHistory.SpgateNo, model.SpgateNo)
         .AddColumn(SmsPlatForm.SmsHistory.SubPort, model.SubPort)
         .AddColumn(SmsPlatForm.SmsHistory.SubPortEx, model.SubPortEx)
         .AddColumn(SmsPlatForm.SmsHistory.FeeNum, model.FeeNum)
         .AddColumn(SmsPlatForm.SmsHistory.PhoneNum, model.PhoneNum)
         .AddColumn(SmsPlatForm.SmsHistory.MsgLen, model.MsgLen)
         .AddColumn(SmsPlatForm.SmsHistory.HasIndex, model.HasIndex)
         .AddColumn(SmsPlatForm.SmsHistory.SendType, model.SendType)
         .AddColumn(SmsPlatForm.SmsHistory.SendFlag, model.SendFlag)
         .AddColumn(SmsPlatForm.SmsHistory.SaveType, model.SaveType)
         .AddColumn(SmsPlatForm.SmsHistory.SendResult, iSendResult)
         .AddColumn(SmsPlatForm.SmsHistory.MobileNum, model.MobileNum)
         .AddColumn(SmsPlatForm.SmsHistory.UnicomNum, model.UnicomNum)
         .AddColumn(SmsPlatForm.SmsHistory.TelecomNum, model.TelecomNum)
         .AddColumn(SmsPlatForm.SmsHistory.ChinaNum, model.ChinaNum)
         .AddColumn(SmsPlatForm.SmsHistory.SingleMobileFee, model.SingleMobileFee)
         .AddColumn(SmsPlatForm.SmsHistory.SingleUnicomFee, model.SingleUnicomFee)
         .AddColumn(SmsPlatForm.SmsHistory.SingleTelecomFee, model.SingleTelecomFee)
         .AddColumn(SmsPlatForm.SmsHistory.SingleChinaFee, model.SingleChinaFee)
         // .AddColumn(SmsPlatForm.SmsHistory.RecvFlag, model.RecvFlag)
         //.AddColumn(SmsPlatForm.SmsHistory.RecvTime, model.RecvTime)
         //.AddColumn(SmsPlatForm.SmsHistory.PtMessageID, strSpMsgID)
         .AddColumn(SmsPlatForm.SmsHistory.SpMessageID, strSpMsgID)
         .AddColumn(SmsPlatForm.SmsHistory.StatusString, strStatusStr).Execute();
         return(true);
     }
     catch (System.Exception e)
     {
     }
     return(false);
 }