コード例 #1
0
        public static EventJoinResult AnsweringEvent(AnsweringEvent obj_Responce)
        {
            try
            {
                dynamic          EventJoinResult = null;
                MySqlParameter[] param           = new MySqlParameter[5];

                param[0] = new MySqlParameter("?profileID", Convert.ToInt32(obj_Responce.profileID));
                param[1] = new MySqlParameter("?eventId", Convert.ToInt32(obj_Responce.eventId));
                param[2] = new MySqlParameter("?joiningStatus", obj_Responce.joiningStatus);
                param[3] = new MySqlParameter("?questionId", string.IsNullOrEmpty(obj_Responce.questionId) ? "0" : obj_Responce.questionId);
                param[4] = new MySqlParameter("?answer", string.IsNullOrEmpty(obj_Responce.answerByme) ? "" : obj_Responce.answerByme);
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    EventJoinResult = context.ExecuteStoreQuery <EventJoinResult>("CALL V4_USPAnsweringEvent(?profileID,?eventId,?joiningStatus,?questionId,?answer)", param).ToList();
                    return(EventJoinResult[0]);
                }
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("Event/AnsweringEvent", "AnsweringEvent()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw ex;
            }
        }
コード例 #2
0
        /// <summary>
        /// Created By : Madhavi
        /// Add and update event data
        /// created On 16/03/2018
        /// </summary>
        public static Imgname AddEvent_New(AddEventResult obj_Input)
        {
            string subGrpIDs = "";

            try
            {
                if (obj_Input.isSubGrpAdmin == "1")
                {
                    subGrpIDs = SubGroupDirectory.GetAdminSubGroupList(obj_Input.grpID, obj_Input.userID);
                }
                MySqlParameter[] param = new MySqlParameter[28];
                param[0]  = new MySqlParameter("?eventID", string.IsNullOrEmpty(obj_Input.eventID) ? "0" : obj_Input.eventID);
                param[1]  = new MySqlParameter("?questionEnable", string.IsNullOrEmpty(obj_Input.questionEnable) ? "0" : obj_Input.questionEnable);
                param[2]  = new MySqlParameter("?eventType", obj_Input.eventType);
                param[3]  = new MySqlParameter("?membersIDs", obj_Input.membersIDs);
                param[4]  = new MySqlParameter("?eventImageID", string.IsNullOrEmpty(obj_Input.eventImageID) ? "0" : obj_Input.eventImageID);
                param[5]  = new MySqlParameter("?evntTitle", obj_Input.evntTitle);
                param[6]  = new MySqlParameter("?evntDesc", obj_Input.evntDesc);
                param[7]  = new MySqlParameter("?eventVenue", obj_Input.eventVenue);
                param[8]  = new MySqlParameter("?venueLat", obj_Input.venueLat);
                param[9]  = new MySqlParameter("?venueLong", obj_Input.venueLong);
                param[10] = new MySqlParameter("?evntDate", obj_Input.evntDate);
                param[11] = new MySqlParameter("?publishDate", obj_Input.publishDate);
                param[12] = new MySqlParameter("?expiryDate", obj_Input.expiryDate);
                param[13] = new MySqlParameter("?sendSMSAll", obj_Input.sendSMSAll);
                param[14] = new MySqlParameter("?rsvpEnable", obj_Input.rsvpEnable);
                param[15] = new MySqlParameter("?sendSMSNonSmartPh", obj_Input.sendSMSNonSmartPh);
                param[16] = new MySqlParameter("?userID", obj_Input.userID);
                param[17] = new MySqlParameter("?grpID", obj_Input.grpID);
                param[18] = new MySqlParameter("?questionID", string.IsNullOrEmpty(obj_Input.questionId) ? "" : obj_Input.questionId);
                param[19] = new MySqlParameter("?questionText", string.IsNullOrEmpty(obj_Input.questionText) ? "" : obj_Input.questionText);
                param[20] = new MySqlParameter("?questionType", string.IsNullOrEmpty(obj_Input.questionType) ? "" : obj_Input.questionType);
                param[21] = new MySqlParameter("?option1", string.IsNullOrEmpty(obj_Input.option1) ? "" : obj_Input.option1);
                param[22] = new MySqlParameter("?option2", string.IsNullOrEmpty(obj_Input.option2) ? "" : obj_Input.option2);
                param[23] = new MySqlParameter("?rsvpRepeatDate", string.IsNullOrEmpty(obj_Input.repeatDateTime) ? "" : obj_Input.repeatDateTime);
                param[24] = new MySqlParameter("?IsSubGrpAdmin", string.IsNullOrEmpty(obj_Input.isSubGrpAdmin) ? "0" : obj_Input.isSubGrpAdmin);
                param[25] = new MySqlParameter("?subgrpIDs", subGrpIDs);
                param[26] = new MySqlParameter("?displayonbanner", obj_Input.displayonbanner);
                param[27] = new MySqlParameter("?reglink", obj_Input.reglink);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    //var Result = _DbTouchbase.ExecuteStoreQuery<Imgname>
                    var Result = context.ExecuteStoreQuery <Imgname>
                                     ("CALL V8_USPAddEvent(?eventID,?questionEnable,?eventType,?membersIDs,?eventImageID,?evntTitle,?evntDesc,?eventVenue,?venueLat,?venueLong,?evntDate,?publishDate,?expiryDate,?userID,?grpID,?sendSMSNonSmartPh,?sendSMSAll,?rsvpEnable,?rsvpRepeatDate,?questionId,?questionText,?questionType,?option1,?option2,?IsSubGrpAdmin,?subgrpIDs,?displayonbanner,?reglink)",
                                     param).SingleOrDefault();

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("Event/AddEvent", "AddEvent()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw;
            }
        }
コード例 #3
0
        public static List <EventsDetail> GetEventBySearchText(string text)
        {
            try
            {
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var searchText = new MySqlParameter("?Search_Text", text);
                    var Result     = context.ExecuteStoreQuery <EventsDetail>("CALL USPEventSearchBYText(?Search_Text)", searchText).ToList();

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("Event/GetEventBySearchText", "GetEventBySearchText()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw ex;
            }
        }