Esempio n. 1
0
        public static int addUpdateWebLink(clsAddWebLinkInput obj)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[5];

                param[0] = new MySqlParameter("?weblinkId", obj.WeblinkId);
                param[1] = new MySqlParameter("?groupId", obj.GroupId);
                param[2] = new MySqlParameter("?createdBy", obj.CreateBy);

                param[3] = new MySqlParameter("?title", obj.Title);
                param[4] = new MySqlParameter("?description", string.IsNullOrEmpty(obj.Description) ? "" : obj.Description);
                param[5] = new MySqlParameter("?url", string.IsNullOrEmpty(obj.LinkUrl) ? "" : obj.LinkUrl);

                MySqlHelper.ExecuteNonQuery(GlobalVar.strAppConn, CommandType.StoredProcedure, "WEBAddUpdateWebLink", param);

                int result = Convert.ToInt32(param[0].Value);

                return(result);
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("WebLinks/addUpdateWebLink", "addUpdateWebLink()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw ex;
            }
        }
Esempio n. 2
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;
            }
        }
Esempio n. 3
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;
            }
        }
Esempio n. 4
0
        public static List <EventsDetail> GetEventBySearchText(string text)
        {
            try
            {
                var searchText = new MySqlParameter("?Search_Text", text);
                var Result     = _DbTouchbase.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;
            }
        }
Esempio n. 5
0
        public static Imgname createAnnouncement(AddAnnouncement ann)
        {
            string subgrpIDs = "";

            try
            {
                if (ann.isSubGrpAdmin == "1" && ann.annType == "0")
                {
                    subgrpIDs = SubGroupDirectory.GetAdminSubGroupList(ann.grpID, ann.memID);
                }
                MySqlParameter[] param = new MySqlParameter[17];
                param[0] = new MySqlParameter("?annID", string.IsNullOrEmpty(ann.announID) ? "0" : ann.announID);
                param[1] = new MySqlParameter("?annType", ann.annType);
                param[2] = new MySqlParameter("?announTitle", ann.announTitle);
                param[3] = new MySqlParameter("?announceDEsc", string.IsNullOrEmpty(ann.announceDEsc) ? "" : ann.announceDEsc);

                param[4] = new MySqlParameter("?memID", ann.memID);
                param[5] = new MySqlParameter("?grpID", ann.grpID);
                param[6] = new MySqlParameter("?memprofileIDs", string.IsNullOrEmpty(ann.inputIDs) ? "" : ann.inputIDs);

                param[7] = new MySqlParameter("?moduleId", ann.moduleId); // Added by Nandu on 07/11/2016 Task--> Module replica

                param[8]  = new MySqlParameter("?announcementImg", string.IsNullOrEmpty(ann.announImg) ? "0" : ann.announImg);
                param[9]  = new MySqlParameter("?sendSMSAll", string.IsNullOrEmpty(ann.sendSMSAll) ? "0" : ann.sendSMSAll);
                param[10] = new MySqlParameter("?sendSMSNonSmartPh", string.IsNullOrEmpty(ann.sendSMSNonSmartPh) ? "0" : ann.sendSMSNonSmartPh);

                param[11] = new MySqlParameter("?publishDate", ann.publishDate);
                param[12] = new MySqlParameter("?expiryDate", ann.expiryDate);
                param[13] = new MySqlParameter("?IsSubGrpAdmin", string.IsNullOrEmpty(ann.isSubGrpAdmin) ? "0" : ann.isSubGrpAdmin);
                param[14] = new MySqlParameter("?subgrpIDs", subgrpIDs);
                param[15] = new MySqlParameter("?annRepeatDate", string.IsNullOrEmpty(ann.AnnouncementRepeatDates) ? "" : ann.AnnouncementRepeatDates);
                param[16] = new MySqlParameter("?reglink", ann.reglink);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <Imgname>("CALL V6_USPAddAnnouncement(?annID,?annType,?announTitle,?announceDEsc,?memID,?grpID,?memprofileIDs,?moduleId,?announcementImg,?publishDate,?expiryDate,?sendSMSAll,?sendSMSNonSmartPh,?IsSubGrpAdmin,?subgrpIDs,?annRepeatDate,?reglink)",
                                                                     param).SingleOrDefault();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("Announcement/AddAnnouncement", "createAnnouncement()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw ex;
            }
        }
Esempio n. 6
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;
            }
        }
Esempio n. 7
0
        public static List <EventList> GetEventList(string memberID, string grpID, string SearchText, string type, string Admin, out string Grp_SMSCount)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[6];
                param[0]           = new MySqlParameter("?memberId", memberID);
                param[1]           = new MySqlParameter("?grpId", grpID);
                param[2]           = new MySqlParameter("?searchText", SearchText);
                param[3]           = new MySqlParameter("?filterType", type);
                param[4]           = new MySqlParameter("?Admin", Admin);
                param[5]           = new MySqlParameter("?SMS_Count", 0);
                param[5].Direction = ParameterDirection.InputOutput;
                DataSet Result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_USPEventSearchBYText", param);

                DataTable        dt  = Result.Tables[0];
                List <EventList> res = new List <EventList>();
                if (dt.Rows.Count > 0)
                {
                    res = GlobalFuns.DataTableToList <EventList>(dt);
                    foreach (EventList eve in res)
                    {
                        if (!string.IsNullOrEmpty(eve.eventImg))
                        {
                            string event_Image = eve.eventImg.ToString();
                            string path        = ConfigurationManager.AppSettings["imgPath"] + "Documents/Event/Group" + grpID + "/thumb/";
                            eve.eventImg = path + event_Image;
                        }
                    }
                }
                Grp_SMSCount = param[5].Value.ToString();
                return(res);
            }
            catch (Exception ex)
            {
                ManageExceptions.TraceException("Event/GetEventList", "GetEventList()", Convert.ToString(ex.InnerException), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                throw ex;
            }
        }