Exemple #1
0
 public bool InsertDMNotificationResponses(DMMessages dmMessages)
 {
     try
     {
         using (ExCommsSQLDataAccess DataContext = this.GetDataContext())
         {
             if (DataContext.usp_InsertDMNotificationResponses(
                     dmMessages.CardNumber,
                     dmMessages.SlotNumber,
                     dmMessages.SlotNumber,
                     dmMessages.FirstName,
                     Convert.ToDateTime(dmMessages.Birthday),
                     dmMessages.DisplayMessage,
                     dmMessages.TransactionCode.ToString(),
                     dmMessages.DisplayControl,
                     dmMessages.ConditionalMask,
                     dmMessages.TotalSegments,
                     dmMessages.SegmentNumber,
                     dmMessages.EPIControl1,
                     dmMessages.EPIControl2,
                     dmMessages.EPIControl3,
                     dmMessages.EPIControl4
                     ) > -1)
             {
                 return(true);
             }
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
     return(false);
 }
Exemple #2
0
 public bool InsertDMresponses(string strResponse)
 {
     try
     {
         DMMessages dMessages = FrameMessage(strResponse);
         return(objResponseDataAccess.InsertDMMessages(dMessages));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
     return(false);
 }
Exemple #3
0
 /// <summary>
 /// To insert DM message in to the DB
 /// </summary>
 /// <param name="strResponse"></param>
 /// <returns></returns>
 public bool InsertDMresponses(string strResponse)
 {
     try
     {
         DMMessages dMessages = FrameMessage(strResponse);
         return(ExCommsDataContext.Current.InsertDMNotificationResponses(dMessages));
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
     return(false);
 }
        private DMMessages FrameMessage(string strResponse)
        {
            DMMessages messages = new DMMessages();
            messages.SlotNumber = GetSlotNumber(strResponse);
            messages.CardNumber = GetCardNumber(strResponse);
            messages.DisplayControl = GetDisplayControl(strResponse);
            messages.SegmentNumber = GetSegmentNumber(strResponse);
            messages.TotalSegments = GetTotalSegments(strResponse);
            messages.TransactionCode = Convert.ToInt32(GetTransactionCode(strResponse));
            messages.DisplayMessage = GetDisplayMessage(strResponse);
            messages.ConditionalMask = GetConditionalMask(strResponse);

            return messages;
        }
Exemple #5
0
        private DMMessages FrameMessage(string strResponse)
        {
            DMMessages messages = new DMMessages();

            messages.SlotNumber      = GetSlotNumber(strResponse);
            messages.CardNumber      = GetCardNumber(strResponse);
            messages.DisplayControl  = GetDisplayControl(strResponse);
            messages.SegmentNumber   = GetSegmentNumber(strResponse);
            messages.TotalSegments   = GetTotalSegments(strResponse);
            messages.TransactionCode = Convert.ToInt32(GetTransactionCode(strResponse));
            messages.DisplayMessage  = GetDisplayMessage(strResponse);
            messages.ConditionalMask = GetConditionalMask(strResponse);

            return(messages);
        }
        public bool InsertDMMessages(DMMessages dmMessages)
        {
            try
            {
                SqlParameter[] ObjParams = new SqlParameter[15];
                ObjParams[0] = new SqlParameter(DBConstants.CONST_PARAM_DM_CARD_NO, dmMessages.CardNumber);
                ObjParams[1] = new SqlParameter(DBConstants.CONST_PARAM_DM_SLOT_NO, dmMessages.SlotNumber);
                ObjParams[2] = new SqlParameter(DBConstants.CONST_PARAM_DM_STAND, dmMessages.SlotNumber);
                ObjParams[3] = new SqlParameter(DBConstants.CONST_PARAM_DM_FIRSTNAME, dmMessages.FirstName);
                ObjParams[4] = new SqlParameter(DBConstants.CONST_PARAM_DM_BIRTHDAY, dmMessages.Birthday);
                ObjParams[5] = new SqlParameter(DBConstants.CONST_PARAM_DM_ACTUALMESSAGE, dmMessages.DisplayMessage);
                ObjParams[6] = new SqlParameter(DBConstants.CONST_PARAM_DM_TYPE, dmMessages.TransactionCode);
                ObjParams[7] = new SqlParameter(DBConstants.CONST_PARAM_DM_DISPLAYCONTROL, dmMessages.DisplayControl);
                ObjParams[8] = new SqlParameter(DBConstants.CONST_PARAM_DM_CONDITIONALMASK, dmMessages.ConditionalMask);
                ObjParams[9] = new SqlParameter(DBConstants.CONST_PARAM_DM_TOTALSEGMENTS, dmMessages.TotalSegments);
                ObjParams[10] = new SqlParameter(DBConstants.CONST_PARAM_DM_DM_SEGMENTNUMBER, dmMessages.SegmentNumber);
                ObjParams[11] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL1, dmMessages.EPIControl1);
                ObjParams[12] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL2, dmMessages.EPIControl2);
                ObjParams[13] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL3, dmMessages.EPIControl3);
                ObjParams[14] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL4, dmMessages.EPIControl4);
                //ObjParams[15] = new SqlParameter(DBConstants.CONST_PARAM_DM_CIR_Sent_TO_Comms
                //ObjParams[16] = new SqlParameter(DBConstants.CONST_PARAM_DM_Sent_FF_TO_Comms 
                //ObjParams[17] = new SqlParameter(DBConstants.CONST_PARAM_DM_CIR_COMMS_DATA   



                if (SqlHelper.ExecuteNonQuery(ConnectionString, DBConstants.SP_USP_INSERTDMNOTIFICATIONRESPONSES, ObjParams) > -1)
                {
                    return true;
                }
            }

            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }

            return false;
        }
        public bool InsertDMMessages(DMMessages dmMessages)
        {
            try
            {
                SqlParameter[] ObjParams = new SqlParameter[15];
                ObjParams[0]  = new SqlParameter(DBConstants.CONST_PARAM_DM_CARD_NO, dmMessages.CardNumber);
                ObjParams[1]  = new SqlParameter(DBConstants.CONST_PARAM_DM_SLOT_NO, dmMessages.SlotNumber);
                ObjParams[2]  = new SqlParameter(DBConstants.CONST_PARAM_DM_STAND, dmMessages.SlotNumber);
                ObjParams[3]  = new SqlParameter(DBConstants.CONST_PARAM_DM_FIRSTNAME, dmMessages.FirstName);
                ObjParams[4]  = new SqlParameter(DBConstants.CONST_PARAM_DM_BIRTHDAY, dmMessages.Birthday);
                ObjParams[5]  = new SqlParameter(DBConstants.CONST_PARAM_DM_ACTUALMESSAGE, dmMessages.DisplayMessage);
                ObjParams[6]  = new SqlParameter(DBConstants.CONST_PARAM_DM_TYPE, dmMessages.TransactionCode);
                ObjParams[7]  = new SqlParameter(DBConstants.CONST_PARAM_DM_DISPLAYCONTROL, dmMessages.DisplayControl);
                ObjParams[8]  = new SqlParameter(DBConstants.CONST_PARAM_DM_CONDITIONALMASK, dmMessages.ConditionalMask);
                ObjParams[9]  = new SqlParameter(DBConstants.CONST_PARAM_DM_TOTALSEGMENTS, dmMessages.TotalSegments);
                ObjParams[10] = new SqlParameter(DBConstants.CONST_PARAM_DM_DM_SEGMENTNUMBER, dmMessages.SegmentNumber);
                ObjParams[11] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL1, dmMessages.EPIControl1);
                ObjParams[12] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL2, dmMessages.EPIControl2);
                ObjParams[13] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL3, dmMessages.EPIControl3);
                ObjParams[14] = new SqlParameter(DBConstants.CONST_PARAM_DM_EPICONTROL4, dmMessages.EPIControl4);
                //ObjParams[15] = new SqlParameter(DBConstants.CONST_PARAM_DM_CIR_Sent_TO_Comms
                //ObjParams[16] = new SqlParameter(DBConstants.CONST_PARAM_DM_Sent_FF_TO_Comms
                //ObjParams[17] = new SqlParameter(DBConstants.CONST_PARAM_DM_CIR_COMMS_DATA



                if (SqlHelper.ExecuteNonQuery(ConnectionString, DBConstants.SP_USP_INSERTDMNOTIFICATIONRESPONSES, ObjParams) > -1)
                {
                    return(true);
                }
            }

            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }

            return(false);
        }