private MobileMessageType GetMSG_TYPE(RequestModel model) { MobileMessageType result = MobileMessageType.SMS; var messageTypeRaw = model.GetValue(Constants.MSG_TYPE_key); if (!Enum.TryParse <MobileMessageType>(messageTypeRaw, out result)) { result = MobileMessageType.SMS; } return(result); }
//mms발송 - SendMMS()에서호출 private ResponseModel SendSMS(string receiverPhoneNum, string senderPhoneNum, string msg, string datetime, MobileMessageType msgType, int mms_seq) { string out_msg = string.Empty; // string proc_name = PROC_SEND_MOBILE_MSG_CUD; // List <SqlParameter> temp_param = new List <SqlParameter>(); temp_param.Add(new SqlParameter("@" + XMLCommonUtil.GUBUN_KEY_STRING, xmlCommonUtil.GUBUN)); //temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_IP_GUBUN, _httpContext.Request.ServerVariables["REMOTE_ADDR"])); temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_IP_GUBUN, _httpContext.Connection.RemoteIpAddress)); //temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_KEY_GUBUN, xmlCommonUtil.QueryString[XMLCommonUtil.OPERATOR_KEY_GUBUN])); temp_param.Add(new SqlParameter("@" + XMLCommonUtil.OPERATOR_KEY_GUBUN, xmlCommonUtil.RequestData.GetValue(XMLCommonUtil.OPERATOR_KEY_GUBUN))); //* bool include_organization_key = XMLCommonUtil.INCLUDE_ORGANIZATION_KEY; if (include_organization_key) { //temp_param.Add(new SqlParameter("@" + XMLCommonUtil.ORGANIZATION_KEY_GUBUN, xmlCommonUtil.QueryString[XMLCommonUtil.ORGANIZATION_KEY_GUBUN].ToString())); temp_param.Add(new SqlParameter("@" + XMLCommonUtil.ORGANIZATION_KEY_GUBUN, xmlCommonUtil.RequestData.GetValue(XMLCommonUtil.ORGANIZATION_KEY_GUBUN))); } //*/ temp_param.Add(new SqlParameter("@" + TRAN_PHONE, receiverPhoneNum)); temp_param.Add(new SqlParameter("@" + TRAN_CALLBACK, senderPhoneNum)); if (!string.IsNullOrEmpty(datetime)) { temp_param.Add(new SqlParameter("@" + TRAN_DATE, datetime)); } temp_param.Add(new SqlParameter("@" + TRAN_TYPE, msgType)); if (msgType == MobileMessageType.MMS) { temp_param.Add(new SqlParameter("@" + TRAN_ETC4, mms_seq)); } temp_param.Add(new SqlParameter("@" + TRAN_MSG, msg)); /* 추가 파라메터 */ for (int seq = 1; seq < 4; seq++) { string pKey = "tran_etc" + seq.ToString(); //if (xmlCommonUtil.QueryString[pKey] != null) //{ // temp_param.Add(new SqlParameter("@" + pKey, xmlCommonUtil.QueryString[pKey].ToString())); //} if (xmlCommonUtil.RequestData.HasKey(pKey)) { temp_param.Add(new SqlParameter("@" + pKey, xmlCommonUtil.RequestData.GetValue(pKey))); } } SqlParameter[] sqlparams = temp_param.ToArray(); return(xmlCommonUtil.WriteXML(proc_name, sqlparams, false)); }