public static Imgname createAlbum_New(ClsAddUpdateAlbumInput album) { string subgrpIDs = ""; try { if (album.isSubGrpAdmin == "1" && album.type == "0") { subgrpIDs = SubGroupDirectory.GetAdminSubGroupList(album.groupId, album.createdBy); } MySqlParameter[] ParameterList = new MySqlParameter[26]; ParameterList[0] = new MySqlParameter("?p_gallery_id", album.albumId); ParameterList[1] = new MySqlParameter("?p_group_id", album.groupId); ParameterList[2] = new MySqlParameter("?p_gallery_type", album.type); ParameterList[3] = new MySqlParameter("?p_memprofileIDs", album.memberIds); ParameterList[4] = new MySqlParameter("?p_album_title", album.albumTitle); ParameterList[5] = new MySqlParameter("?p_album_description", string.IsNullOrEmpty(album.albumDescription) ? "" : album.albumDescription); ParameterList[6] = new MySqlParameter("?p_image", string.IsNullOrEmpty(album.albumImage) ? "0" : album.albumImage); ParameterList[7] = new MySqlParameter("?p_createdby", album.createdBy); ParameterList[8] = new MySqlParameter("?IsSubgrpAdmin", string.IsNullOrEmpty(album.isSubGrpAdmin) ? "0" : album.isSubGrpAdmin); ParameterList[9] = new MySqlParameter("?subGrpIDs", subgrpIDs); ParameterList[10] = new MySqlParameter("?moduleID", album.moduleId); // Added for Gallery Replica ParameterList[11] = new MySqlParameter("?shareType", album.shareType); // Added for Gallery shareType ParameterList[12] = new MySqlParameter("?categoryId", album.categoryId); ParameterList[13] = new MySqlParameter("?dateofproect", album.dateofproject); ParameterList[14] = new MySqlParameter("?costofproject", album.costofproject); ParameterList[15] = new MySqlParameter("?beneficiary", album.beneficiary); ParameterList[16] = new MySqlParameter("?manhourspent", album.manhourspent); ParameterList[17] = new MySqlParameter("?manhourspenttype", album.manhourspenttype); ParameterList[18] = new MySqlParameter("?p_NumberofRotarian", album.NumberofRotarian); ParameterList[19] = new MySqlParameter("?p_OtherCategorytext", album.OtherCategorytext); ParameterList[20] = new MySqlParameter("?costofprojecttype", album.costofprojecttype); ParameterList[21] = new MySqlParameter("?Attendance", album.Attendance); ParameterList[22] = new MySqlParameter("?AttendancePer", album.AttendancePer); ParameterList[23] = new MySqlParameter("?MeetingType", album.MeetingType); ParameterList[24] = new MySqlParameter("?AgendaDocID", album.AgendaDocID); ParameterList[25] = new MySqlParameter("?MOMDocID", album.MOMDocID); using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <Imgname>("CALL V7_1_USPAddEditGallery(?p_gallery_id, ?p_group_id, ?p_gallery_type, ?p_memprofileIDs, ?p_album_title, ?p_album_description, ?p_image, ?p_createdby, ?IsSubgrpAdmin, ?subGrpIDs, ?moduleID, ?shareType,?categoryId,?dateofproect,?costofproject,?beneficiary,?manhourspent,?manhourspenttype,?p_NumberofRotarian,?p_OtherCategorytext,?costofprojecttype,?Attendance,?AttendancePer,?MeetingType,?AgendaDocID,?MOMDocID)", ParameterList).SingleOrDefault(); return(Result); } } catch (Exception ex) { throw ex; } }
/// <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; } }
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; } }
public static string createEbulletin(AddEbulletin ebulletin) { string subgrpIDs = ""; try { if (ebulletin.isSubGrpAdmin == "1" && ebulletin.ebulletinType == "0") { subgrpIDs = SubGroupDirectory.GetAdminSubGroupList(ebulletin.grpID, ebulletin.memID); } MySqlParameter[] param = new MySqlParameter[14]; param[0] = new MySqlParameter("?bulletinID", string.IsNullOrEmpty(ebulletin.ebulletinID) ? "0" : ebulletin.ebulletinID); param[1] = new MySqlParameter("?bulletinType", string.IsNullOrEmpty(ebulletin.ebulletinType) ? "0" : ebulletin.ebulletinType); param[2] = new MySqlParameter("?ebulletinTitle", ebulletin.ebulletinTitle); param[3] = new MySqlParameter("?ebulletinlink", string.IsNullOrEmpty(ebulletin.ebulletinlink) ? "" : ebulletin.ebulletinlink); param[4] = new MySqlParameter("?ebulletinfile", string.IsNullOrEmpty(ebulletin.ebulletinfileid) ? "" : ebulletin.ebulletinfileid); param[5] = new MySqlParameter("?memID", ebulletin.memID); param[6] = new MySqlParameter("?grpID", ebulletin.grpID); param[7] = new MySqlParameter("?memprofileIDs", string.IsNullOrEmpty(ebulletin.inputIDs) ? "" : ebulletin.inputIDs); param[8] = new MySqlParameter("?publishDate", ebulletin.publishDate); param[9] = new MySqlParameter("?expiryDate", ebulletin.expiryDate); param[10] = new MySqlParameter("?sendSMSAll", string.IsNullOrEmpty(ebulletin.sendSMSAll) ? "0" : ebulletin.sendSMSAll); param[11] = new MySqlParameter("?sendSMSNonSmartPh", string.IsNullOrEmpty(ebulletin.sendSMSNonSmartPh) ? "0" : ebulletin.sendSMSNonSmartPh); param[12] = new MySqlParameter("?IsSubGrpAdmin", string.IsNullOrEmpty(ebulletin.isSubGrpAdmin) ? "0" : ebulletin.isSubGrpAdmin); param[13] = new MySqlParameter("?subgrpIDs", subgrpIDs); using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <string>("CALL V5_USPAddEbulletin(?bulletinID,?bulletinType,?ebulletinTitle,?ebulletinlink,?ebulletinfile,?memID,?grpID,?memprofileIDs,?publishDate,?expiryDate,?sendSMSAll,?sendSMSNonSmartPh,?IsSubGrpAdmin,?subgrpIDs)", param).SingleOrDefault(); return(Result); } } catch (Exception ex) { throw ex; } }
public static AddDocResult createDocument(AddDocument doc) { string subgrpIDs = ""; try { if (doc.isSubGrpAdmin == "1" && doc.docType == "0") { subgrpIDs = SubGroupDirectory.GetAdminSubGroupList(doc.grpID, doc.memID); } MySqlParameter[] param = new MySqlParameter[12]; param[0] = new MySqlParameter("?docID", string.IsNullOrEmpty(doc.docID) ? "0" : doc.docID); param[1] = new MySqlParameter("?documentType", doc.docType); param[2] = new MySqlParameter("?documentTitle", doc.docTitle); param[3] = new MySqlParameter("?docAccessType", doc.docAccessType); param[4] = new MySqlParameter("?memID", doc.memID); param[5] = new MySqlParameter("?grpID", doc.grpID); param[6] = new MySqlParameter("?memprofileIDs", string.IsNullOrEmpty(doc.inputIDs) ? "" : doc.inputIDs); param[7] = new MySqlParameter("?documentFileId", string.IsNullOrEmpty(doc.documentFileId) ? "0" : doc.documentFileId); param[8] = new MySqlParameter("?isSubGrpAdmin", string.IsNullOrEmpty(doc.isSubGrpAdmin)?"0":doc.isSubGrpAdmin); param[9] = new MySqlParameter("?subgrpIDs", subgrpIDs); param[10] = new MySqlParameter("?publishDate", doc.publishDate); param[11] = new MySqlParameter("?expiryDate", doc.expiryDate); using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <AddDocResult>("CALL V6_USPAddDocument(?docID,?documentType,?documentTitle,?docAccessType,?memID,?grpID,?memprofileIDs,?documentFileId,?isSubGrpAdmin,?subgrpIDs,?publishDate,?expiryDate)", param).SingleOrDefault(); return(Result); } } catch (Exception ex) { throw ex; } }
public static Imgname createAlbum(ClsAddUpdateAlbumInput album) { string subgrpIDs = ""; try { if (album.isSubGrpAdmin == "1" && album.type == "0") { subgrpIDs = SubGroupDirectory.GetAdminSubGroupList(album.groupId, album.createdBy); } MySqlParameter[] ParameterList = new MySqlParameter[12]; ParameterList[0] = new MySqlParameter("?p_gallery_id", album.albumId); ParameterList[1] = new MySqlParameter("?p_group_id", album.groupId); ParameterList[2] = new MySqlParameter("?p_gallery_type", album.type); ParameterList[3] = new MySqlParameter("?p_memprofileIDs", album.memberIds); ParameterList[4] = new MySqlParameter("?p_album_title", album.albumTitle); ParameterList[5] = new MySqlParameter("?p_album_description", string.IsNullOrEmpty(album.albumDescription) ? "" : album.albumDescription); ParameterList[6] = new MySqlParameter("?p_image", string.IsNullOrEmpty(album.albumImage) ? "0" : album.albumImage); ParameterList[7] = new MySqlParameter("?p_createdby", album.createdBy); ParameterList[8] = new MySqlParameter("?IsSubgrpAdmin", string.IsNullOrEmpty(album.isSubGrpAdmin) ? "0" : album.isSubGrpAdmin); ParameterList[9] = new MySqlParameter("?subGrpIDs", subgrpIDs); ParameterList[10] = new MySqlParameter("?moduleID", album.moduleId); // Added for Gallery Replica ParameterList[11] = new MySqlParameter("?shareType", album.shareType); // Added for Gallery shareType using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities()) { context.Connection.Open(); var Result = context.ExecuteStoreQuery <Imgname>("CALL V6_1_USPAddEditGallery(?p_gallery_id, ?p_group_id, ?p_gallery_type, ?p_memprofileIDs, ?p_album_title, ?p_album_description, ?p_image, ?p_createdby, ?IsSubgrpAdmin, ?subGrpIDs, ?moduleID, ?shareType)", ParameterList).SingleOrDefault(); return(Result); } } catch (Exception ex) { throw ex; } }