コード例 #1
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static List <RotarianResult> GetRotarian(FindRotarianInput search)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[4];
                param[0] = new MySqlParameter("?MemberName", string.IsNullOrEmpty(search.name) ? "" : search.name.Replace(" ", "%"));
                param[1] = new MySqlParameter("?classification", string.IsNullOrEmpty(search.classification) ? "" : search.classification.Replace(" ", "%"));
                param[2] = new MySqlParameter("?club", string.IsNullOrEmpty(search.club) ? "" : search.club.Replace(" ", "%"));
                param[3] = new MySqlParameter("?districtNo", string.IsNullOrEmpty(search.district_number) ? "0" : search.district_number.Replace(" ", "%"));
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <RotarianResult>("CALL V1_USPFindRotarian(?MemberName,?classification,?club,?districtNo)", param).ToList();

                    foreach (RotarianResult Mem in Result)
                    {
                        if (!string.IsNullOrEmpty(Mem.pic) && Mem.pic != "profile_photo.png")
                        {
                            string ImageName = Mem.pic.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                            Mem.pic = path + ImageName;
                        }
                        else
                        {
                            Mem.pic = ConfigurationManager.AppSettings["imgPath"] + "images/profile_pic.png";
                        }
                    }
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        public static List <DistrictCommitteeResult> GetDistrictCommittee(string grpId, string searchText)
        {
            List <DistrictCommitteeResult> result = new List <DistrictCommitteeResult>();

            MySqlParameter[] parameters = new MySqlParameter[2];
            parameters[0] = new MySqlParameter("?groupId", grpId);
            parameters[1] = new MySqlParameter("?searchText", string.IsNullOrEmpty(searchText) ? "" : searchText.Replace(' ', '%'));
            try
            {
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    result = context.ExecuteStoreQuery <DistrictCommitteeResult>("CALL V1_USPGetDistrictCommittee(?groupId,?searchText)", parameters).ToList();
                    foreach (DistrictCommitteeResult mem in result)
                    {
                        if (!string.IsNullOrEmpty(mem.pic))
                        {
                            string ImageName = mem.pic.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                            mem.pic = path + ImageName;
                        }
                    }
                }
            }
            catch
            {
                throw;
            }
            return(result);
        }
コード例 #3
0
        public static List <ServiceDirectoryDetail> GetServiceDirDetails(ServiceDirDetail serv)
        {
            try
            {
                var serviceDirId = new MySqlParameter("?serviceDirId", serv.serviceDirId);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <ServiceDirectoryDetail>("CALL V3_USPGetServiceDirectoryDetail(?serviceDirId)", serviceDirId).ToList();

                    foreach (ServiceDirectoryDetail service in Result)
                    {
                        if (!string.IsNullOrEmpty(service.serviceImage))
                        {
                            string profile_Image = service.serviceImage.ToString();
                            string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/servicedirectory/Group" + serv.groupId + "/";

                            service.serviceImage      = path + profile_Image;            //actual image URL
                            service.serviceThumbimage = path + "thumb/" + profile_Image; //thumb image URL
                        }
                        else
                        {
                            service.serviceThumbimage = "";
                        }
                    }

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
        public static int updateGroupSetting(GrpSettingResult grp)
        {
            try
            {
                var GroupId        = new MySqlParameter("?GrpId", grp.GroupId);
                var ModuleId       = new MySqlParameter("?ModuleId", grp.ModuleId);
                var GroupProfileId = new MySqlParameter("?profileId", grp.GroupProfileId);

                var UpdatedValue = new MySqlParameter("?UpdatedValue", grp.UpdatedValue);

                var mobileSelf    = new MySqlParameter("?showMobileSeflfClub", grp.showMobileSeflfClub);
                var mobileOutside = new MySqlParameter("?showMobileOutsideClub", grp.showMobileOutsideClub);
                var emailSelf     = new MySqlParameter("?showEmailSeflfClub", grp.showEmailSeflfClub);
                var emailOutside  = new MySqlParameter("?showEmailOutsideClub", grp.showEmailOutsideClub);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreCommand("CALL USPGroupSettings(?GrpId,?ModuleId,?profileId,?UpdatedValue,?showMobileSeflfClub,?showMobileOutsideClub,?showEmailSeflfClub,?showEmailOutsideClub)",
                                                             GroupId, ModuleId, GroupProfileId, UpdatedValue, mobileSelf, mobileOutside, emailSelf, emailOutside);

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
        public static List <ClsGetAlbumDetailsOutput> GetAlbumDetails(ClsGetAlbumDetailsInput album)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];

                parameterList[0] = new MySqlParameter("?AlbumId", album.albumId);
                //parameterList[1] = new MySqlParameter("?GroupId", album.grpId);
                //parameterList[2] = new MySqlParameter("?ProfileId", album.memberProfileId);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <ClsGetAlbumDetailsOutput>("CALL V6_1_USPGetAlbumDetails(?AlbumId)", parameterList).ToList();

                    foreach (ClsGetAlbumDetailsOutput objAlbum in Result)
                    {
                        if (!string.IsNullOrEmpty(objAlbum.albumImage))
                        {
                            string announ_Image = objAlbum.albumImage.ToString();
                            string path         = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + objAlbum.groupId + "/";
                            objAlbum.albumImage = path + announ_Image;
                        }
                    }
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #6
0
        public static List <ImprovementList> GetImprovementDetails(ImprovementDetail imp)
        {
            try
            {
                var imprID          = new MySqlParameter("?imprID", imp.improvementID);
                var grpID           = new MySqlParameter("?grpID", imp.grpID);
                var memberProfileID = new MySqlParameter("?memberProfileID", imp.memberProfileID);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <ImprovementList>("CALL V4_USPGetImprovementDetails(?imprID,?grpID,?memberProfileID)", imprID, grpID, memberProfileID).ToList();

                    foreach (ImprovementList improvement in Result)
                    {
                        if (!string.IsNullOrEmpty(improvement.improvementImg))
                        {
                            string announ_Image = improvement.improvementImg.ToString();
                            string path         = ConfigurationManager.AppSettings["imgPath"] + "Documents/Improvement/Group" + imp.grpID + "/";
                            improvement.improvementImg = path + announ_Image;
                        }
                    }
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #7
0
ファイル: Ticket.cs プロジェクト: KaizenInfotechIT/ChakiatAPI
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static int createTicket(SendTicket tkt)
        {
            try
            {
                var grpID     = new MySqlParameter("?groupId", tkt.groupId);
                var profileId = new MySqlParameter("?memberProfileId", tkt.memberProfileId);
                var smsText   = new MySqlParameter("?smsText", tkt.smsText);
                var createBy  = new MySqlParameter("?createBy", tkt.createBy);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreCommand("CALL V2_USPAddTicket(?groupId,?memberProfileId,?smsText,?createBy)",
                                                             grpID, profileId, smsText, createBy);
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GC.Collect();
            }
        }
コード例 #8
0
        /// <summary>
        /// Created By : Nandkishor K
        /// Created Date : 24/07/2017
        /// Reason : Listing of Events(Only having Event Type - All)
        /// </summary>
        public static EventList1 GetEventMinDetails(string eventID)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];
                parameterList[0] = new MySqlParameter("?eventID", eventID);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    EventList1 evt = context.ExecuteStoreQuery <EventList1>("Call V4_USPEventDetails(?eventID)", parameterList).SingleOrDefault();
                    if (evt != null)
                    {
                        if (!string.IsNullOrEmpty(evt.eventImg))
                        {
                            string event_Image = evt.eventImg.ToString();
                            string path        = ConfigurationManager.AppSettings["imgPath"] + "Documents/Event/Group" + evt.grpID + "/thumb/";
                            evt.eventImg = path + event_Image;
                        }
                    }
                    return(evt);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #9
0
        public static List <Club> GetClubsNearMe(NearMeInput club)
        {
            try
            {
                if (club.distanceUnit == "Miles" && !string.IsNullOrEmpty(club.distance))
                {
                    club.distance = (Convert.ToDouble(club.distance) * converter).ToString();
                }

                MySqlParameter[] param = new MySqlParameter[5];
                param[0] = new MySqlParameter("?dist", string.IsNullOrEmpty(club.distance) ? "0" : club.distance);
                param[1] = new MySqlParameter("?currentLat", string.IsNullOrEmpty(club.currentLat) ? "0" : club.currentLat);
                param[2] = new MySqlParameter("?currentLong", string.IsNullOrEmpty(club.currentLong) ? "0" : club.currentLong);
                param[3] = new MySqlParameter("?meetingDay", string.IsNullOrEmpty(club.meetingDay) ? "" : club.meetingDay.Replace(" ", "%"));
                param[4] = new MySqlParameter("?meetingTime", string.IsNullOrEmpty(club.meetingTime) ? "0" : club.meetingTime);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <Club>("CALL V1_GetClubNearMe(?dist,?meetingDay,?meetingTime,?currentLat,?currentLong)", param).ToList();

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #10
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static List <ServiceDirectoryList> GetServiceDirectoryList(ServiceDirectorySearch search)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[3];

                param[0] = new MySqlParameter("@grpId", search.groupId);
                param[1] = new MySqlParameter("@moduleId", search.moduleId); // Added by Nandu on 30/09/2016 Task--> Module replica
                param[2] = new MySqlParameter("@updateOn", search.updatedOn);

                //var Result = _DBTouchbase.ExecuteStoreQuery<ServiceDirectoryList>("CALL V3_USPGetServiceDirectoryList(?grpId,?updateOn)", param).ToList();

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <ServiceDirectoryList>("CALL V6_USPGetServiceDirectoryList(?grpId,?moduleId,?updateOn)", param).ToList(); // Added by Nandu on 30/09/2016 Task--> Module replica

                    foreach (ServiceDirectoryList servDir in Result)
                    {
                        if (!string.IsNullOrEmpty(servDir.image))
                        {
                            string profile_Image = servDir.image.ToString();
                            string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/servicedirectory/Group" + search.groupId + "/thumb/";
                            servDir.image = path + profile_Image;
                        }
                    }

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #11
0
        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;
            }
        }
コード例 #12
0
        public static Imgname createService(AddServiceDirectory service)
        {
            try
            {
                var serviceId = new MySqlParameter("?p_service_id", service.serviceId);
                var groupId   = new MySqlParameter("?p_group_id", service.groupId);
                var moduleId  = new MySqlParameter("?p_module_id", service.moduleId); // Added by Nandu on 30/09/2016 Task--> Module replica

                var memberName  = new MySqlParameter("?p_member_name", string.IsNullOrEmpty(service.memberName) ? "" : service.memberName);
                var description = new MySqlParameter("?p_description", string.IsNullOrEmpty(service.description) ? "" : service.description);
                var image       = new MySqlParameter("?p_image", string.IsNullOrEmpty(service.image) ? "0" : service.image);

                var countryCode1 = new MySqlParameter("?p_country_code1", string.IsNullOrEmpty(service.countryCode1) ? "" : service.countryCode1);
                var mobileNo1    = new MySqlParameter("?p_mobile_no1", string.IsNullOrEmpty(service.mobileNo1) ? "" : service.mobileNo1);
                var countryCode2 = new MySqlParameter("?p_country_code2", string.IsNullOrEmpty(service.countryCode2) ? "" : service.countryCode2);
                var mobileNo2    = new MySqlParameter("?p_mobile_no2", string.IsNullOrEmpty(service.mobileNo2) ? "" : service.mobileNo2);
                var paxNo        = new MySqlParameter("?p_pax_no", string.IsNullOrEmpty(service.paxNo) ? "" : service.paxNo);
                var email        = new MySqlParameter("?p_email", string.IsNullOrEmpty(service.email) ? "" : service.email);

                var keywords = new MySqlParameter("?p_keywords", string.IsNullOrEmpty(service.keywords) ? "" : service.keywords);

                var address   = new MySqlParameter("?p_address", string.IsNullOrEmpty(service.address) ? "" : service.address);
                var latitude  = new MySqlParameter("?p_latitude", string.IsNullOrEmpty(service.latitude) ? "" : service.latitude);
                var longitude = new MySqlParameter("?p_longitude", string.IsNullOrEmpty(service.longitude) ? "" : service.longitude);

                var createdBy = new MySqlParameter("?p_created", string.IsNullOrEmpty(service.createdBy) ? "" : service.createdBy);

                var addressCode = new MySqlParameter("?p_address_code", string.IsNullOrEmpty(service.addressCountry) ? "" : service.addressCountry);
                var city        = new MySqlParameter("?p_city", string.IsNullOrEmpty(service.city) ? "" : service.city);
                var state       = new MySqlParameter("?p_state", string.IsNullOrEmpty(service.state) ? "" : service.state);
                var zipcode     = new MySqlParameter("?p_zipcode", string.IsNullOrEmpty(service.zipcode) ? "" : service.zipcode);

                var website  = new MySqlParameter("?p_website", string.IsNullOrEmpty(service.website) ? "" : service.website);
                var category = new MySqlParameter("?p_category", string.IsNullOrEmpty(service.categoryId) ? "0" : service.categoryId);

                // Added by Nandu on 30/09/2016 Task--> Module replica
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <Imgname>("CALL V7_USPAddServiceDirectory(?p_created, ?p_service_id, ?p_group_id, ?p_module_id, ?p_member_name, ?p_description, ?p_image, ?p_country_code1, ?p_mobile_no1, ?p_country_code2, ?p_mobile_no2, ?p_pax_no, ?p_email, ?p_keywords, ?p_address, ?p_latitude, ?p_longitude, ?p_address_code, ?p_city, ?p_state, ?p_zipcode, ?p_website, ?p_category )",
                                                                     createdBy, serviceId, groupId, moduleId, memberName, description, image, countryCode1, mobileNo1, countryCode2, mobileNo2, paxNo, email, keywords, address, latitude, longitude, addressCode, city, state, zipcode, website, category).SingleOrDefault();

                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GC.Collect();
            }
        }
コード例 #13
0
        public static List <MemberListResult> GetSubGroupMemberList(SubGrpDirectoryInput mem)
        {
            string subGrpIDs = "";
            List <MemberListResult> memberList = new List <MemberListResult>();

            try
            {
                // Check if member is subgroup Admin
                MySqlParameter[] param = new MySqlParameter[3];
                param[0]           = new MySqlParameter("?grpId", mem.groupId);
                param[1]           = new MySqlParameter("?profileID", mem.profileId);
                param[2]           = new MySqlParameter("?IsAdmin", "1");
                param[2].Direction = ParameterDirection.InputOutput;
                DataSet dsSubgrpIDs = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_SubGroupIsAdmin", param);

                if (dsSubgrpIDs != null)
                {
                    for (int i = 0; i < dsSubgrpIDs.Tables[0].Rows.Count; i++)
                    {
                        subGrpIDs += dsSubgrpIDs.Tables[0].Rows[i]["subGrpID"].ToString();
                        subGrpIDs += ",";
                    }
                    subGrpIDs = subGrpIDs.TrimEnd(',');
                }
                if (Convert.ToInt32(param[2].Value) > 0)
                {
                    MySqlParameter[] param1 = new MySqlParameter[3];
                    param1[0] = new MySqlParameter("?grpId", mem.groupId);
                    param1[1] = new MySqlParameter("?profileID", mem.profileId);
                    param1[2] = new MySqlParameter("?subGrpIds", subGrpIDs);

                    using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                    {
                        context.Connection.Open();
                        memberList = context.ExecuteStoreQuery <MemberListResult>("CALL V4_USPGetSubGrpAdminMemberList(?grpId,?profileID,?subGrpIds)", param1).ToList();
                        foreach (MemberListResult member in memberList)
                        {
                            if (!string.IsNullOrEmpty(member.pic))
                            {
                                string ImageName = member.pic.ToString();
                                string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                member.pic = path + ImageName;
                            }
                        }
                    }
                }
            }
            catch
            {
                throw;
            }
            return(memberList);
        }
コード例 #14
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;
            }
        }
コード例 #15
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static List <EbulletinList> GetEbulletinBySearchText(string searchText)
        {
            try
            {
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var text   = new MySqlParameter("?searchText", searchText);
                    var Result = context.ExecuteStoreQuery <EbulletinList>("CALL USPSearchEbulletinList(?searchText)", text).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #16
0
        public static Imgname createImprovement(AddImprovement imp)
        {
            try
            {
                if (string.IsNullOrEmpty(imp.improvementID))
                {
                    imp.improvementID = "0";
                }

                if (string.IsNullOrEmpty(imp.inputIDs))
                {
                    imp.inputIDs = "";
                }

                var imprID    = new MySqlParameter("?imprID", imp.improvementID);
                var imprType  = new MySqlParameter("?imprType", imp.imprType);
                var imprTitle = new MySqlParameter("?imprTitle", imp.improvementTitle);
                var imprDesc  = new MySqlParameter("?imprDesc", string.IsNullOrEmpty(imp.improvementDesc) ? "" : imp.improvementDesc);

                var memID             = new MySqlParameter("?memID", imp.memID);
                var grpID             = new MySqlParameter("?grpID", imp.grpID);
                var memprofileIDs     = new MySqlParameter("?memprofileIDs", imp.inputIDs);
                var imprImg           = new MySqlParameter("?ImprovementImg", string.IsNullOrEmpty(imp.improvementImg) ? "0" : imp.improvementImg);
                var sendSMSAll        = new MySqlParameter("?sendSMSAll", string.IsNullOrEmpty(imp.sendSMSAll) ? "0" : imp.sendSMSAll);
                var sendSMSNonSmartPh = new MySqlParameter("?sendSMSNonSmartPh", string.IsNullOrEmpty(imp.sendSMSNonSmartPh) ? "0" : imp.sendSMSNonSmartPh);
                var publishDate       = new MySqlParameter("?publishDate", imp.publishDate);
                var expiryDate        = new MySqlParameter("?expiryDate", imp.expiryDate);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <Imgname>("CALL V4_USPAddImprovement(?imprID,?imprType,?imprTitle,?imprDesc,?memID,?grpID,?memprofileIDs,?ImprovementImg,?publishDate,?expiryDate,?sendSMSAll,?sendSMSNonSmartPh)",
                                                                     imprID, imprType, imprTitle, imprDesc, memID, grpID, memprofileIDs, imprImg, publishDate, expiryDate, sendSMSAll, sendSMSNonSmartPh).SingleOrDefault();
                    //var Result = 1;
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                GC.Collect();
            }
        }
コード例 #17
0
 public static List <ClsTodayBirthday> GetTodaysBirthday(string groupID)
 {
     try
     {
         MySqlParameter[] parameterList = new MySqlParameter[1];
         parameterList[0] = new MySqlParameter("?grpID", groupID);
         using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
         {
             context.Connection.Open();
             var result = context.ExecuteStoreQuery <ClsTodayBirthday>("Call V6_USPGetTodaysBirthday(?grpID)", parameterList).ToList();
             return(result);
         }
     }
     catch
     {
         throw;
     }
 }
コード例 #18
0
 public static int UpdateDocumentDetails(UpdateReadFlag doc)
 {
     try
     {
         var docID           = new MySqlParameter("?docID", doc.docID);
         var memberProfileID = new MySqlParameter("?memberProfileID", doc.memberProfileID);
         using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
         {
             context.Connection.Open();
             var Result = context.ExecuteStoreCommand("CALL USPUpdateDocumentDetails(?docID,?memberProfileID)", docID, memberProfileID);
             return(Result);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #19
0
 public static int GetEbulletinDetails(EbulletinDetails ebull)
 {
     try
     {
         var EbullID         = new MySqlParameter("?EbullID", ebull.ebulletinID);
         var memberProfileID = new MySqlParameter("?memberProfileID", ebull.memberProfileID);
         using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
         {
             context.Connection.Open();
             var Result = context.ExecuteStoreCommand("CALL USPGetEbulletinDetails(?EbullID,?memberProfileID)", EbullID, memberProfileID);
             return(Result);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #20
0
        public static List <SettingDetails> getAllTouchbaseSetting(MainMasterId mem)
        {
            try
            {
                var mainMasterId = new MySqlParameter("?mainMasterId", mem.mainMasterId);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <SettingDetails>("CALL USPGetTouchbase_rowSettings(?mainMasterId)", mainMasterId).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #21
0
 public static List <Club> GetDistrictClubs(string groupId, string searchStr)
 {
     try
     {
         var GrpId  = new MySqlParameter("?groupId", groupId);
         var search = new MySqlParameter("?search", searchStr);
         using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
         {
             context.Connection.Open();
             List <Club> Result = context.ExecuteStoreQuery <Club>("CALL V1_USPGetDistrictClubs(?groupId,?search)", GrpId, search).ToList();
             return(Result);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #22
0
 public static List <SubGroupList> GetDistrictSubGroup(string GrpID, string subgrpType)
 {
     try
     {
         var grpId      = new MySqlParameter("?grpId", GrpID);
         var subGrpType = new MySqlParameter("?subgrpType", subgrpType);
         using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
         {
             context.Connection.Open();
             List <SubGroupList> Result = context.ExecuteStoreQuery <SubGroupList>("CALL V6_USPDistGetSubGroupList(?grpId,?subGrpType)", grpId, subGrpType).ToList();
             return(Result);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #23
0
        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;
            }
        }
コード例 #24
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DbTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static List <clsVersionList> getVesionList(clsVersionInput input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[1];

                param[0] = new MySqlParameter("?p_type", input.Type);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <clsVersionList>("CALL MobileAPI_VersionControllist(?p_type)", param).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #25
0
        //Created By Mukesh A. Dhole
        public static List <GetAttendanceDetails> getAttendanceDetails(GetAttendanceDetails_Input Input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[1];

                param[0] = new MySqlParameter("?p_AttendanceID", Input.AttendanceID);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <GetAttendanceDetails>("CALL USP_API_Mobile_getAttendanceDetails(?p_AttendanceID)", param).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #26
0
        public static List <GetAttendanceDelegateDetailsByRotarianName> GetAttendanceDistrinctDelegateDetailsByRotarianName(GetAttendanceRotarian_Input Input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[1];

                param[0] = new MySqlParameter("?p_RotarianName", Input.RotarianName);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <GetAttendanceDelegateDetailsByRotarianName>("CALL USP_API_Mobile_GetAttendanceDistrinctByRotarianName(?p_RotarianName)", param).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #27
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DbTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static int updateTouchbaseSetting(GroupDetail grp)
        {
            try
            {
                var grpId       = new MySqlParameter("?grpId", grp.GroupId);
                var updateValue = new MySqlParameter("?updateValue", grp.UpdatedValue);
                var mainMstId   = new MySqlParameter("?mainMstId", grp.mainMasterId);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreCommand("CALL USPtouchbase_rowSettings(?grpId,?updateValue,?mainMstId)", grpId, updateValue, mainMstId);
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #28
0
        public static List <SubGroupList> GetSubGroupList(SubGroup sub)
        {
            try
            {
                var grpId      = new MySqlParameter("?grpId", sub.groupId);
                var profileID  = new MySqlParameter("?profileID", sub.memberProfileId);
                var subGroupId = new MySqlParameter("?subGroupId", string.IsNullOrEmpty(sub.subGroupID) ? "0" : sub.subGroupID);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <SubGroupList>("CALL V3_USPGetSubGroupList(?grpId,?profileID,?subGroupId)", grpId, profileID, subGroupId).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #29
0
        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;
            }
        }
コード例 #30
0
        //Created By Mukesh A. Dhole
        public static List <GetAttendanceEventsListNew> getAttendanceEventsListNew(GetAttendanceListNew_Input Input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[3];

                param[0] = new MySqlParameter("?grpId", Input.groupID);
                param[1] = new MySqlParameter("?searchText", Input.searchText);
                param[2] = new MySqlParameter("?filterType", Input.type);
                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <GetAttendanceEventsListNew>("CALL WEBAttendanceGetEventList(?grpId,?searchText,?filterType)", param).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }