Пример #1
0
        public static List <MemberList> GetClubsMemberList(GroupInfo input)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[2];
                parameterList[0] = new MySqlParameter("?groupID", input.grpID);
                parameterList[1] = new MySqlParameter("?SearchText", input.SearchText);
                DataSet   result       = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V7_USPGetClubMemberList", parameterList);
                DataTable dtMemberList = result.Tables[0];

                List <MemberList> memberList = new List <MemberList>();

                if (dtMemberList.Rows.Count > 0)
                {
                    memberList = GlobalFuns.DataTableToList <MemberList>(dtMemberList);

                    foreach (MemberList mem in memberList)
                    {
                        if (!string.IsNullOrEmpty(mem.pic))
                        {
                            string ImageName = mem.pic.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                            mem.pic = path + ImageName;
                        }
                    }
                }
                return(memberList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        public static List <DistrictMemListResult> GetMemberByClassification(string classification, string groupID)
        {
            List <DistrictMemListResult> memberList = new List <DistrictMemListResult>();

            try
            {
                MySqlParameter[] param = new MySqlParameter[2];
                param[0] = new MySqlParameter("?classification", classification.Replace(" ", "%"));
                param[1] = new MySqlParameter("?groupID", groupID);
                DataSet dsMember = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V7_USPGetMemberByClassification", param);

                if (dsMember != null)
                {
                    if (dsMember.Tables[0].Rows.Count > 0)
                    {
                        memberList = GlobalFuns.DataTableToList <DistrictMemListResult>(dsMember.Tables[0]);

                        foreach (DistrictMemListResult mem in memberList)
                        {
                            if (!string.IsNullOrEmpty(mem.pic))
                            {
                                string ImageName = mem.pic.ToString();
                                string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                mem.pic = path + ImageName;
                            }
                        }
                    }
                }
            }
            catch
            {
                throw;
            }
            return(memberList);
        }
Пример #3
0
        public static districtCommittee getDistrictCommitteeList(districtCommitteeInput Obj)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[2];

                param[0] = new MySqlParameter("@p_groupId", Obj.groupID);
                param[1] = new MySqlParameter("@p_searchText", Obj.searchText);
                DataSet Result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "API_districtCommitteeList", param);

                DataTable dt_WithoutCatlist = Result.Tables[0];
                DataTable dt_withcatlist    = Result.Tables[1];

                List <districtCommitteeWithoutCatList> WithoutCategoryList = new List <districtCommitteeWithoutCatList>();
                List <districtCommitteeWithCatList>    WithDirectoryList   = new List <districtCommitteeWithCatList>();

                if (dt_WithoutCatlist.Rows.Count > 0)
                {
                    foreach (DataRow item in dt_WithoutCatlist.Rows)
                    {
                        if (item["img"].ToString() != "")
                        {
                            if (item["fk_Member_profileID"].ToString() == "0")
                            {
                                string profile_Image = item["img"].ToString();
                                string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/DistrictCommittee/Group" + Obj.groupID + "/thumb/";
                                item["img"] = path + profile_Image;
                            }
                            else
                            {
                                string profile_Image = item["img"].ToString();
                                string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                item["img"] = path + profile_Image;
                            }
                        }
                        else
                        {
                            item["img"] = "";
                        }
                    }

                    WithoutCategoryList = GlobalFuns.DataTableToList <districtCommitteeWithoutCatList>(dt_WithoutCatlist);
                }

                if (dt_withcatlist.Rows.Count > 0)
                {
                    WithDirectoryList = GlobalFuns.DataTableToList <districtCommitteeWithCatList>(dt_withcatlist);
                }

                districtCommittee obj = new districtCommittee();
                obj.districtCommitteeWithoutCatList = WithoutCategoryList;
                obj.districtCommitteeWithCatList    = WithDirectoryList;

                return(obj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #4
0
        /// <summary>
        /// Created By : Nandkishor K
        /// Created Date : 24/07/2017
        /// Reason : Listing of Public Albums
        /// </summary>
        public static List <ClsAlbumList> GetPublicAlbumList(GroupInfo input)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];

                parameterList[0] = new MySqlParameter("?grpID", input.grpID);

                DataSet   result      = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "USPPublicAlbumList", parameterList);
                DataTable dtNewAlbums = result.Tables[0];

                List <ClsAlbumList> NewMemberList = new List <ClsAlbumList>();
                if (dtNewAlbums.Rows.Count > 0)
                {
                    NewMemberList = GlobalFuns.DataTableToList <ClsAlbumList>(dtNewAlbums);

                    foreach (ClsAlbumList g in NewMemberList)
                    {
                        if (!string.IsNullOrEmpty(g.image))
                        {
                            string ImageName = g.image.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.image = path + ImageName;
                        }
                    }
                }

                return(NewMemberList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #5
0
        /// <summary>
        /// Created By : Nandkishor K
        /// Created Date : 24/07/2017
        /// Reason : Listing of Events(Only having Event Type - All)
        /// </summary>
        public static List <EventList1> GetPublicEventsList(GroupInfo input)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];
                parameterList[0] = new MySqlParameter("?grpID", input.grpID);

                DataSet   result      = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V3_USPPublicEventList", parameterList);
                DataTable dtEventList = result.Tables[0];

                List <EventList1> PublicEventList = new List <EventList1>();
                if (dtEventList.Rows.Count > 0)
                {
                    PublicEventList = GlobalFuns.DataTableToList <EventList1>(dtEventList);

                    foreach (EventList1 g in PublicEventList)
                    {
                        if (!string.IsNullOrEmpty(g.eventImg))
                        {
                            string event_Image = g.eventImg.ToString();
                            string path        = ConfigurationManager.AppSettings["imgPath"] + "Documents/Event/Group" + input.grpID + "/thumb/";
                            g.eventImg = path + event_Image;
                        }
                    }
                }

                return(PublicEventList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #6
0
        public static List <classificationOutput> GetClassificationList(DistrictMemListInput obj, out int totalPages)
        {
            List <classificationOutput> Result = new List <classificationOutput>();

            try
            {
                MySqlParameter[] param = new MySqlParameter[5];
                param[0]           = new MySqlParameter("?grpID", obj.grpID);
                param[1]           = new MySqlParameter("?PageNo", string.IsNullOrEmpty(obj.pageNo) ? "1" : obj.pageNo);
                param[2]           = new MySqlParameter("?NoOfRecord", string.IsNullOrEmpty(obj.recordCount) ? "100" : obj.recordCount);
                param[3]           = new MySqlParameter("?TotalCount", DbType.Int32);
                param[4]           = new MySqlParameter("?SearchText", string.IsNullOrEmpty(obj.searchText) ? "" : obj.searchText);
                param[3].Direction = ParameterDirection.Output;
                DataSet dsClassification = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V7GetDistrictClassifications", param);
                totalPages = Convert.ToInt32(param[3].Value);
                if (dsClassification != null)
                {
                    if (dsClassification.Tables[0].Rows.Count > 0)
                    {
                        Result = GlobalFuns.DataTableToList <classificationOutput>(dsClassification.Tables[0]);
                    }
                }
            }
            catch
            {
                throw;
            }
            return(Result);
        }
Пример #7
0
        /// <summary>
        /// Created By : Nandkishor K
        /// Created Date : 24/07/2017
        /// Reason : Listing of Newsletters(Only having Newsletters Type - All)
        /// </summary>
        public static List <EbulletinList> GetPublicNewsletterList(GroupInfo input)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];
                parameterList[0] = new MySqlParameter("?grpID", input.grpID);

                DataSet   result           = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V2_USPPublicEbulletinList", parameterList);
                DataTable dtNewsletterList = result.Tables[0];

                List <EbulletinList> PublicNewsletterList = new List <EbulletinList>();
                if (dtNewsletterList.Rows.Count > 0)
                {
                    PublicNewsletterList = GlobalFuns.DataTableToList <EbulletinList>(dtNewsletterList);

                    foreach (EbulletinList g in PublicNewsletterList)
                    {
                        if (!string.IsNullOrEmpty(g.ebulletinlink) && g.ebulletinType != "Link")
                        {
                            string ebulletinlink = g.ebulletinlink.ToString();
                            string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/ebulletin/Group" + input.grpID + "/";
                            g.ebulletinlink = path + ebulletinlink;
                        }
                    }
                }

                return(PublicNewsletterList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #8
0
        public object GetAnnouncementList(AnnouncementSearch ann)
        {
            dynamic       TBAnnounceListResult;
            List <object> AnnounListResult = new List <object>();
            DataSet       Result           = new DataSet();

            try
            {
                string search = "";

                if (ann.searchText == null)
                {
                    search = "";
                }
                else
                {
                    search = ann.searchText;
                }


                Result = Announcement.GetAnnouncementList(ann, search);
                DataTable dt  = Result.Tables[0];
                DataTable dt1 = Result.Tables[1];

                List <AnnounceList> res = new List <AnnounceList>();

                if (dt.Rows.Count > 0)
                {
                    res = GlobalFuns.DataTableToList <AnnounceList>(dt);

                    if (!string.IsNullOrEmpty(res[0].announImg))
                    {
                        string announ_Image = res[0].announImg.ToString();
                        string path         = ConfigurationManager.AppSettings["imgPath"] + "Documents/announcement/Group" + ann.groupId + "/thumb/";
                        res[0].announImg = path + announ_Image;
                    }
                }

                for (int i = 0; i < res.Count; i++)
                {
                    AnnounListResult.Add(new { AnnounceList = res[i] });
                }

                if (res != null && res.Count != 0)
                {
                    TBAnnounceListResult = new { status = "0", message = "success", smscount = dt1.Rows[0]["SMSCount"].ToString(), AnnounListResult = AnnounListResult };
                }
                else
                {
                    TBAnnounceListResult = new { status = "1", message = "Record not found", smscount = dt1.Rows[0]["SMSCount"].ToString(), AnnounListResult = AnnounListResult };
                }
            }
            catch
            {
                TBAnnounceListResult = new { status = "1", message = "failed", smscount = 0 };
            }

            return(new { TBAnnounceListResult });
        }
Пример #9
0
        public object GetWelcomeScreen(UserLogin user)
        {
            string message; string Status;
            int    uId        = Convert.ToInt32(user.masterUID);
            var    memberName = "";

            //var grpPartResults = "";
            try
            {
                List <object> grpPartResults = new List <object>();

                DataSet ds_Data = Login.Get_Welcomescreen_Data(user);
                List <GrpPartResult> GrpPartResult = null;
                if (ds_Data.Tables[0].Rows.Count > 0)
                {
                    memberName = ds_Data.Tables[0].Rows[0]["member_name"].ToString();
                }
                if (ds_Data.Tables[1].Rows.Count > 0)
                {
                    GrpPartResult = GlobalFuns.DataTableToList <GrpPartResult>(ds_Data.Tables[1]);
                }

                for (int i = 0; i < GrpPartResult.Count; i++)
                {
                    grpPartResults.Add(new { GrpPartResult = GrpPartResult[i] });
                }


                if (grpPartResults.Count > 0)
                {
                    message = "Success"; Status = "0";
                    var WelcomeResult = new { status = Status, message = message, Name = memberName, grpPartResults };
                    return(new
                    {
                        WelcomeResult
                    });
                }
                else
                {
                    var WelcomeResult = new { status = "1", message = "User does not belong to any group", grpPartResults };
                    return(new
                    {
                        WelcomeResult
                    });
                }
            }
            catch
            {
                var WelcomeResult = new { status = "1", message = "An error occurred, please try again or contact the administrator" };
                return(new
                {
                    WelcomeResult
                });
            }
        }
        public object GetLeaderBoardDetails(LeaderBoard_Input Obj)
        {
            dynamic       TBLeaderBoardResult;
            List <object> LeaderBoardResult = new List <object>();

            try
            {
                DataSet ds_details = LeaderBoard.getLeaderBoardDetails(Obj);

                List <LeaderBoard_clubList> Result = GlobalFuns.DataTableToList <LeaderBoard_clubList>(ds_details.Tables[1]);

                string TotalProjectsstr    = "0";
                string ProjectCoststr      = "0";
                string BeneficiaryCountstr = "0";
                string ManHoursCountstr    = "0";
                string RotariansCountstr   = "0";
                string MembersCountstr     = "0";
                string TRFCountstr         = "0";

                if (ds_details.Tables[0].Rows.Count > 0)
                {
                    string[] commandArgs = ds_details.Tables[0].Rows[0]["ClubsDetails"].ToString().Split(new char[] { '|' });

                    TotalProjectsstr    = commandArgs[0].ToString();
                    ProjectCoststr      = commandArgs[1].ToString();
                    BeneficiaryCountstr = commandArgs[2].ToString();
                    ManHoursCountstr    = commandArgs[3].ToString();
                    RotariansCountstr   = commandArgs[4].ToString();
                    MembersCountstr     = commandArgs[5].ToString();
                    TRFCountstr         = commandArgs[6].ToString();
                }

                for (int i = 0; i < Result.Count; i++)
                {
                    LeaderBoardResult.Add(new { LeaderBoardResult = Result[i] });
                }

                if (LeaderBoardResult != null)
                {
                    TBLeaderBoardResult = new { status = "0", message = "success", TotalProjects = TotalProjectsstr, ProjectCost = ProjectCoststr, BeneficiaryCount = BeneficiaryCountstr, ManHoursCount = ManHoursCountstr, RotariansCount = RotariansCountstr, MembersCount = MembersCountstr, TRFCount = TRFCountstr, LeaderBoardResult };
                }
                else
                {
                    TBLeaderBoardResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBLeaderBoardResult = new { status = "1", message = "failed" };
            }

            return(new { TBLeaderBoardResult });
        }
Пример #11
0
        public static RotarianDetailsOutput GetRotarianDetails(string profileID)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[1];
                param[0] = new MySqlParameter("?profileID", profileID);
                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V2_1_USPGetRotarianDetails", param);
                List <RotarianDetailsOutput> rowMember = new List <RotarianDetailsOutput>();
                if (result != null)
                {
                    DataTable dtMember = result.Tables[0];
                    if (dtMember.Rows.Count > 0)
                    {
                        rowMember = GlobalFuns.DataTableToList <RotarianDetailsOutput>(dtMember);

                        if (!string.IsNullOrEmpty(rowMember[0].pic) && rowMember[0].pic != "profile_photo.png")
                        {
                            string ImageName = rowMember[0].pic.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                            rowMember[0].pic = path + ImageName;
                        }
                    }
                    if (result.Tables[1] != null)
                    {
                        if (result.Tables[1].Rows.Count > 0)
                        {
                            rowMember[0].BusinessAddress = result.Tables[1].Rows[0]["BusinessAddress"].ToString();
                            rowMember[0].city            = result.Tables[1].Rows[0]["city"].ToString();
                            rowMember[0].state           = result.Tables[1].Rows[0]["state"].ToString();
                            rowMember[0].country         = result.Tables[1].Rows[0]["country"].ToString();
                            rowMember[0].pincode         = result.Tables[1].Rows[0]["pincode"].ToString();
                            rowMember[0].Fax             = result.Tables[1].Rows[0]["Fax"].ToString();
                            rowMember[0].phoneNo         = result.Tables[1].Rows[0]["phoneNo"].ToString();
                        }
                        else
                        {
                            rowMember[0].BusinessAddress = "";
                            rowMember[0].city            = "";
                            rowMember[0].state           = "";
                            rowMember[0].country         = "";
                            rowMember[0].pincode         = "";
                            rowMember[0].Fax             = "";
                            rowMember[0].phoneNo         = "";
                        }
                    }
                }
                return(rowMember[0]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #12
0
        public static ClsMonthCalenderOutput GetMonthEventList(ClsMonthCalenderInput monthCal)
        {
            try
            {
                string sqlProc;
                if (monthCal.groupCategory == "2")
                {
                    sqlProc = "V7_USPGetDistrictEventByMonth_Calender";
                }
                else
                {
                    sqlProc = "V7_USPGetEventByMonth_Calender";
                }
                MySqlParameter[] parameterList = new MySqlParameter[4];
                parameterList[0] = new MySqlParameter("?GroupID", monthCal.groupId);
                parameterList[1] = new MySqlParameter("?ProfileID", monthCal.profileId);
                parameterList[2] = new MySqlParameter("?Curr_Date", monthCal.selectedDate);
                parameterList[3] = new MySqlParameter("?UpdatedOn", monthCal.updatedOn);

                DataSet   result          = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);
                DataTable dtNewEvents     = result.Tables[0];
                DataTable dtUpdatedEvents = result.Tables[1];
                DataTable dtDeletedEvents = result.Tables[2];

                List <CalenderEventList> NewEventList = new List <CalenderEventList>();
                if (dtNewEvents.Rows.Count > 0)
                {
                    NewEventList = GlobalFuns.DataTableToList <CalenderEventList>(dtNewEvents);
                }
                List <CalenderEventList> UpdatedEventList = new List <CalenderEventList>();
                if (dtUpdatedEvents.Rows.Count > 0)
                {
                    UpdatedEventList = GlobalFuns.DataTableToList <CalenderEventList>(dtUpdatedEvents);
                }
                List <CalenderEventList> DeletedEventList = new List <CalenderEventList>();
                if (dtDeletedEvents.Rows.Count > 0)
                {
                    DeletedEventList = GlobalFuns.DataTableToList <CalenderEventList>(dtDeletedEvents);
                }
                ClsMonthCalenderOutput calender = new ClsMonthCalenderOutput();
                calender.newEvents     = NewEventList;
                calender.updatedEvents = UpdatedEventList;
                calender.deletedEvents = DeletedEventList;

                return(calender);
            }
            catch
            {
                throw;
            }
        }
Пример #13
0
        public object GetDocumentList(GetDocument doc)
        {
            dynamic       TBDocumentistResult;
            List <object> DocumentListResult = new List <object>();
            DataSet       Result             = new DataSet();

            try
            {
                Result = DocumentSafe.GetDocumentList(doc);
                DataTable dt  = Result.Tables[0];
                DataTable dt1 = Result.Tables[1];

                List <DocumentList> res = new List <DocumentList>();

                if (dt.Rows.Count > 0)
                {
                    res = GlobalFuns.DataTableToList <DocumentList>(dt);

                    for (int i = 0; i < res.Count; i++)
                    {
                        if (!string.IsNullOrEmpty(res[i].docURL))
                        {
                            string docURL = res[i].docURL.ToString();
                            string path   = ConfigurationManager.AppSettings["imgPath"] + "Documents/documentsafe/Group" + doc.grpID + "/";
                            res[i].docURL = path + docURL;
                        }
                    }
                }


                for (int i = 0; i < res.Count; i++)
                {
                    DocumentListResult.Add(new { DocumentList = res[i] });
                }

                if (res != null && res.Count != 0)
                {
                    TBDocumentistResult = new { status = "0", message = "success", smscount = dt1.Rows[0]["SMSCount"].ToString(), DocumentLsitResult = DocumentListResult };
                }
                else
                {
                    TBDocumentistResult = new { status = "1", message = "Record not found", smscount = dt1.Rows[0]["SMSCount"].ToString(), DocumentLsitResult = DocumentListResult };
                }
            }
            catch
            {
                TBDocumentistResult = new { status = "1", message = "failed", smscount = 0 };
            }

            return(new { TBDocumentistResult });
        }
Пример #14
0
        public static ClubDetails GetClubDetails(string clubId)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[1];
                param[0] = new MySqlParameter("?clubId", clubId);
                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V1_USPClubDetails", param);

                DataTable dtclub      = result.Tables[0];
                DataTable dtpresident = result.Tables[1];
                DataTable dtsecretary = result.Tables[2];
                DataTable dtGovernor  = result.Tables[3];

                List <ClubDetails> ClubDetailList = new List <ClubDetails>();
                if (dtclub.Rows.Count > 0)
                {
                    ClubDetailList = GlobalFuns.DataTableToList <ClubDetails>(dtclub);
                }

                List <MemberDetl> presidentList = new List <MemberDetl>();
                if (dtpresident.Rows.Count > 0)
                {
                    presidentList = GlobalFuns.DataTableToList <MemberDetl>(dtpresident);
                }

                List <MemberDetl> secretaryList = new List <MemberDetl>();
                if (dtpresident.Rows.Count > 0)
                {
                    secretaryList = GlobalFuns.DataTableToList <MemberDetl>(dtsecretary);
                }

                List <MemberDetl> Governor = new List <MemberDetl>();
                if (dtpresident.Rows.Count > 0)
                {
                    Governor = GlobalFuns.DataTableToList <MemberDetl>(dtGovernor);
                }

                if (ClubDetailList.Count > 0)
                {
                    ClubDetailList[0].president        = presidentList;
                    ClubDetailList[0].secretary        = secretaryList;
                    ClubDetailList[0].districtGovernor = Governor;
                }
                return(ClubDetailList[0]);
            }
            catch
            {
                throw;
            }
        }
Пример #15
0
        public static clsPastPresidentsOutput GetPastPresidentsList(clsPastPresidentsInput inputParam)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[3];
                param[0] = new MySqlParameter("?GroupId", inputParam.GroupId);
                param[1] = new MySqlParameter("?SearchText", string.IsNullOrEmpty(inputParam.SearchText) ? "" : inputParam.SearchText.Replace(" ", "%").Trim());
                param[2] = new MySqlParameter("?updateOn", inputParam.updateOn);

                DataSet ds = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V1_USPGetPastPresidentsList", param);

                DataTable dtNewRecords      = ds.Tables[0];
                DataTable dtUpdatedRecords  = ds.Tables[1];
                string    strDeletedRecords = ds.Tables[2].Rows[0]["PastPresidentId"].ToString();

                List <clsPastPresident> newRecords = new List <clsPastPresident>();
                newRecords = GlobalFuns.DataTableToList <clsPastPresident>(dtNewRecords);
                foreach (clsPastPresident objPP in newRecords)
                {
                    if (!string.IsNullOrEmpty(objPP.PhotoPath))
                    {
                        objPP.PhotoPath = ConfigurationManager.AppSettings["imgPath"] + "Documents/pastpresidents/Group" + inputParam.GroupId + "/" + objPP.PhotoPath;
                    }
                }

                List <clsPastPresident> updatedRecords = new List <clsPastPresident>();
                updatedRecords = GlobalFuns.DataTableToList <clsPastPresident>(dtUpdatedRecords);
                foreach (clsPastPresident objPP in updatedRecords)
                {
                    if (!string.IsNullOrEmpty(objPP.PhotoPath))
                    {
                        objPP.PhotoPath = ConfigurationManager.AppSettings["imgPath"] + "Documents/pastpresidents/Group" + inputParam.GroupId + "/" + objPP.PhotoPath;
                    }
                }

                clsPastPresidentsOutput obj = new clsPastPresidentsOutput();

                obj.newRecords     = newRecords;
                obj.updatedRecords = updatedRecords;
                obj.deletedRecords = strDeletedRecords;

                return(obj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #16
0
        public static List <AnnounceList> GetAnnouncementDetails(AnnouncementDetail ann)
        {
            string repeatDateTime = "";

            try
            {
                MySqlParameter[] param = new MySqlParameter[3];
                param[0] = new MySqlParameter("@announID", ann.announID);
                param[1] = new MySqlParameter("@grpID", ann.grpID);
                param[2] = new MySqlParameter("@memberProfileID", ann.memberProfileID);

                DataSet             Result               = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V6_USPGetAnnouncementDetails", param);
                DataTable           dtAnnouncement       = Result.Tables[0];
                DataTable           dtRepeatAnnouncement = Result.Tables[1];
                List <AnnounceList> Anndetail            = new List <AnnounceList>();

                if (dtAnnouncement.Rows.Count > 0)
                {
                    Anndetail = GlobalFuns.DataTableToList <AnnounceList>(dtAnnouncement);

                    if (!string.IsNullOrEmpty(Anndetail[0].announImg))
                    {
                        string announ_Image = Anndetail[0].announImg.ToString();
                        string path         = ConfigurationManager.AppSettings["imgPath"] + "Documents/announcement/Group" + ann.grpID + "/";
                        Anndetail[0].announImg = path + announ_Image;
                    }

                    if (dtRepeatAnnouncement.Rows.Count > 0)
                    {
                        for (int i = 0; i < dtRepeatAnnouncement.Rows.Count; i++)
                        {
                            repeatDateTime += dtRepeatAnnouncement.Rows[i]["annRepeatDate"].ToString() + ",";
                        }
                        repeatDateTime = repeatDateTime.TrimEnd(',');
                    }
                    Anndetail[0].repeatDateTime = repeatDateTime;
                }
                return(Anndetail);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #17
0
        public static List <DistrictMemListResult> GetDistrictMemberList(DistrictMemListInput obj, out int totalPages)
        {
            List <DistrictMemListResult> memberList = new List <DistrictMemListResult>();

            try
            {
                if (!string.IsNullOrEmpty(obj.searchText))
                {
                    obj.searchText = obj.searchText.Replace(" ", "%");
                }
                MySqlParameter[] param = new MySqlParameter[6];
                param[0]           = new MySqlParameter("?masterUID", obj.masterUID);
                param[1]           = new MySqlParameter("?groupID", obj.grpID);
                param[2]           = new MySqlParameter("?SearchText", string.IsNullOrEmpty(obj.searchText)?"":obj.searchText);
                param[3]           = new MySqlParameter("?PageNo", string.IsNullOrEmpty(obj.pageNo)?"1":obj.pageNo);
                param[4]           = new MySqlParameter("?NoOfRecord", string.IsNullOrEmpty(obj.recordCount)?"100":obj.recordCount);
                param[5]           = new MySqlParameter("?TotalCount", DbType.Int32);
                param[5].Direction = ParameterDirection.InputOutput;
                DataSet dsMember = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V7_USPGetDistrictDirectoryList", param);
                totalPages = Convert.ToInt32(param[5].Value);
                if (dsMember != null)
                {
                    if (dsMember.Tables[0].Rows.Count > 0)
                    {
                        memberList = GlobalFuns.DataTableToList <DistrictMemListResult>(dsMember.Tables[0]);

                        foreach (DistrictMemListResult mem in memberList)
                        {
                            if (!string.IsNullOrEmpty(mem.pic))
                            {
                                string ImageName = mem.pic.ToString();
                                string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                mem.pic = path + ImageName;
                            }
                        }
                    }
                }
            }
            catch
            {
                throw;
            }
            return(memberList);
        }
Пример #18
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DbTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static List <ClubMonthlyReportList> GetMonthlyReportList(ClubMonthlyReport_Input Obj)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[5];

                param[0] = new MySqlParameter("?p_profileId", Obj.profileId);
                param[1] = new MySqlParameter("?p_groupId", Obj.groupId);
                param[2] = new MySqlParameter("?p_month", Obj.month);
                param[3] = new MySqlParameter("?p_type", Obj.type);
                param[4] = new MySqlParameter("?p_Fk_ZoneID", Obj.Fk_ZoneID);

                DataSet Result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "USP_API_Mobile_GetMonthlyReportList", param);

                //var Result = _DbTouchbase.ExecuteStoreQuery<ClubMonthlyReportList>("CALL USP_API_Mobile_GetMonthlyReportList(?p_profileId,?p_groupId,?p_month,?p_type)", param).ToList();

                DataTable dtResult = Result.Tables[0];
                List <ClubMonthlyReportList> EbulletinList = new List <ClubMonthlyReportList>();

                if (dtResult.Rows.Count > 0)
                {
                    EbulletinList = GlobalFuns.DataTableToList <ClubMonthlyReportList>(dtResult);

                    for (int i = 0; i < EbulletinList.Count; i++)
                    {
                        if (!string.IsNullOrEmpty(EbulletinList[i].reportUrl))
                        {
                            string ebulletinlink = EbulletinList[i].reportUrl.ToString();
                            string path          = System.Configuration.ConfigurationManager.AppSettings["imgPath"] + "Documents/Clubmonthly/Group" + EbulletinList[i].ClubId + "/";
                            EbulletinList[i].reportUrl = path + ebulletinlink;
                        }
                    }
                }

                return(EbulletinList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #19
0
        public static List <ClsPhotoList> GetAlbumPhotoList_New(ClsPhotoListInput album)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[1];

                parameterList[0] = new MySqlParameter("?AlbumId", album.albumId);


                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_1_USPAlbumList_New", parameterList);

                DataTable dtNewPhoto = result.Tables[0];

                List <ClsPhotoList> NewPhotoList = new List <ClsPhotoList>();
                if (dtNewPhoto.Rows.Count > 0)
                {
                    NewPhotoList = GlobalFuns.DataTableToList <ClsPhotoList>(dtNewPhoto);

                    foreach (ClsPhotoList g in NewPhotoList)
                    {
                        if (!string.IsNullOrEmpty(g.url))
                        {
                            string ImageName = g.url.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + album.groupId + "/Album" + album.albumId + "/";
                            g.url = path + ImageName;
                        }
                    }
                }
                ClsPhotoListOutput photoList = new ClsPhotoListOutput();
                photoList.newPhotos = NewPhotoList;

                return(photoList.newPhotos);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #20
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;
            }
        }
        public static ClsSeviceCategoryData GetServiceCategoriesData(ServiceDirectorySearch input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[4];
                param[0] = new MySqlParameter("@grpId", input.groupId);
                param[1] = new MySqlParameter("@moduleId", input.moduleId);

                DataSet Result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V8_GetServiceCategoriesList", param);

                DataTable dtCategory  = Result.Tables[0];
                DataTable dtDirectory = Result.Tables[1];

                List <ServiceCategoryList>  ServiceCategoryList  = new List <ServiceCategoryList>();
                List <ServiceDirectoryList> ServiceDirectoryList = new List <ServiceDirectoryList>();

                if (dtCategory.Rows.Count > 0)
                {
                    ServiceCategoryList = GlobalFuns.DataTableToList <ServiceCategoryList>(dtCategory);
                }

                if (dtDirectory.Rows.Count > 0)
                {
                    ServiceDirectoryList = GlobalFuns.DataTableToList <ServiceDirectoryList>(dtDirectory);
                }

                ClsSeviceCategoryData obj = new ClsSeviceCategoryData();
                obj.Category      = ServiceCategoryList;
                obj.DirectoryData = ServiceDirectoryList;

                return(obj);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #22
0
        public static List <EbulletinList> GetYearWiseEbulletinList(InputGetYearWiseEbull input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[4];
                param[0] = new MySqlParameter("@memberId", input.memberProfileId);
                param[1] = new MySqlParameter("@grpId", input.groupId);
                param[2] = new MySqlParameter("@fromYear", input.fromYear);
                param[3] = new MySqlParameter("@toYear", input.toYear);

                DataSet Result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V3_USPGetYearWiseEbulletinList", param);

                DataTable            dtResult      = Result.Tables[0];
                List <EbulletinList> EbulletinList = new List <EbulletinList>();

                if (dtResult.Rows.Count > 0)
                {
                    EbulletinList = GlobalFuns.DataTableToList <EbulletinList>(dtResult);

                    for (int i = 0; i < EbulletinList.Count; i++)
                    {
                        if (!string.IsNullOrEmpty(EbulletinList[i].ebulletinlink) && EbulletinList[i].ebulletinType != "Link")
                        {
                            string ebulletinlink = EbulletinList[i].ebulletinlink.ToString();
                            string path          = ConfigurationManager.AppSettings["imgPath"] + "Documents/ebulletin/Group" + input.groupId + "/";
                            EbulletinList[i].ebulletinlink = path + ebulletinlink;
                        }
                    }
                }

                return(EbulletinList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #23
0
        public static List <EventsDetail> GetEventDetails(string grpID, string eventID, string groupProfileID)
        {
            string repeatDateTime = "";

            try
            {
                MySqlParameter[] param = new MySqlParameter[3];
                param[0]       = new MySqlParameter("@grpID", MySqlDbType.Int16);
                param[1]       = new MySqlParameter("@eventID", MySqlDbType.Int16);
                param[2]       = new MySqlParameter("@groupProfileID", MySqlDbType.Int16);
                param[0].Value = grpID;
                param[1].Value = eventID;
                param[2].Value = groupProfileID;
                DataSet             result        = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_USPGetEventListDetails", param);
                DataTable           dtEvent       = result.Tables[0];
                DataTable           dtRepeatEvent = result.Tables[1];
                DataTable           dtQuestions   = result.Tables[2];
                List <EventsDetail> Eventdetail   = new List <EventsDetail>();
                if (dtEvent.Rows.Count > 0)
                {
                    Eventdetail = GlobalFuns.DataTableToList <EventsDetail>(dtEvent);
                    if (!string.IsNullOrEmpty(Eventdetail[0].eventImg))
                    {
                        string event_Image = Eventdetail[0].eventImg.ToString();
                        // string path = HttpContext.Current.Server.MapPath("~/Documents/Events/Group" + grpID + "/thumb/");
                        string path = ConfigurationManager.AppSettings["imgPath"] + "Documents/Event/Group" + grpID + "/";
                        Eventdetail[0].eventImg = path + event_Image;
                    }
                    if (dtRepeatEvent.Rows.Count > 0)
                    {
                        for (int i = 0; i < dtRepeatEvent.Rows.Count; i++)
                        {
                            repeatDateTime += dtRepeatEvent.Rows[i]["eventDate"].ToString() + ",";
                        }
                        repeatDateTime = repeatDateTime.TrimEnd(',');
                    }
                    Eventdetail[0].repeatDateTime = repeatDateTime;

                    //Eventdetail[0].repeatEventResult = new List<object>();
                    //Eventdetail[0].questionArray = new List<object>();
                    //if (dtRepeatEvent.Rows.Count > 0)
                    //{
                    //    List<RepeatEvent> RepeatEvent = GlobalFuns.DataTableToList<RepeatEvent>(dtRepeatEvent);
                    //    for (int i = 0; i < RepeatEvent.Count; i++)
                    //    {
                    //        Eventdetail[0].repeatEventResult.Add(new { RepeatEvent = (object)RepeatEvent[i] });
                    //    }
                    //}
                    if (dtQuestions.Rows.Count == 1)
                    {
                        Eventdetail[0].questionId   = dtQuestions.Rows[0]["questionId"].ToString();
                        Eventdetail[0].questionText = dtQuestions.Rows[0]["questionText"].ToString();
                        Eventdetail[0].questionType = dtQuestions.Rows[0]["questionType"].ToString();
                        Eventdetail[0].option1      = dtQuestions.Rows[0]["option1"].ToString();
                        Eventdetail[0].option2      = dtQuestions.Rows[0]["option2"].ToString();
                    }
                    else
                    {
                        Eventdetail[0].questionId   = "";
                        Eventdetail[0].questionText = "";
                        Eventdetail[0].questionType = "";
                        Eventdetail[0].option1      = "";
                        Eventdetail[0].option2      = "";
                    }
                }
                return(Eventdetail);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #24
0
        //public static ClsGetShowcaseDetailsOutPut GetShowcaseDetails(GetShowcaseDetails clschowcase)
        //{
        //    try
        //    {
        //        string sqlProc;

        //        sqlProc = "V1_USPGetShowcaseDetails";

        //        MySqlParameter[] parameterList = new MySqlParameter[0];
        //        parameterList[0] = new MySqlParameter("?DistrictID", clschowcase.DistrictID);
        //        //parameterList[1] = new MySqlParameter("?ProfileID", monthCal.profileId);
        //        //parameterList[2] = new MySqlParameter("?Curr_Date", monthCal.selectedDate);
        //        //parameterList[3] = new MySqlParameter("?UpdatedOn", monthCal.updatedOn);

        //        DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);
        //        DataTable dtClub = result.Tables[0];


        //        List<GetShowcaseDetails> ClubList = new List<GetShowcaseDetails>();
        //        if (dtClub.Rows.Count > 0)
        //        {
        //            ClubList = GlobalFuns.DataTableToList<GetShowcaseDetails>(dtClub);
        //        }

        //        ClsGetShowcaseDetailsOutPut showcase = new ClsGetShowcaseDetailsOutPut();
        //        showcase.Club = ClubList;
        //        return showcase;
        //    }
        //    catch
        //    {
        //        throw;
        //    }
        //}


        public static ClsAlbumListOutput GetGalleryList_New(ClsAlbumListInput gallery)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[10];

                parameterList[0] = new MySqlParameter("?grpId", gallery.groupId);
                parameterList[1] = new MySqlParameter("?district_id", gallery.district_id);
                parameterList[2] = new MySqlParameter("?category_id", gallery.category_id);
                parameterList[3] = new MySqlParameter("?year", gallery.year);
                parameterList[4] = new MySqlParameter("?club_id", gallery.club_id);
                parameterList[5] = new MySqlParameter("?SharType", gallery.SharType);
                parameterList[6] = new MySqlParameter("?ProfileId", gallery.profileId);
                parameterList[7] = new MySqlParameter("?ModuleID", gallery.moduleId);
                parameterList[8] = new MySqlParameter("?ClubRotaryType", gallery.ClubRotaryType);
                parameterList[9] = new MySqlParameter("?SearchText", gallery.searchText);//Nitesh Tiwari 27.03.2019 12.30 pm
                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V7_1_USPGalleryList", parameterList);

                DataTable dtNewAlbums = result.Tables[0];
                //DataTable dtTotals = result.Tables[0];
                //DataTable dtDeletedAlbums = result.Tables[2];

                List <ClsAlbumList> NewMemberList = new List <ClsAlbumList>();
                //List<ClsTotalOutput> TotalList = new List<ClsTotalOutput>();
                if (dtNewAlbums.Rows.Count > 0)
                {
                    NewMemberList = GlobalFuns.DataTableToList <ClsAlbumList>(dtNewAlbums);
                    //TotalList = GlobalFuns.DataTableToList<ClsTotalOutput>(dtTotals);

                    foreach (ClsAlbumList g in NewMemberList)
                    {
                        if (!string.IsNullOrEmpty(g.image))
                        {
                            string ImageName = g.image.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.image = path + ImageName;
                        }
                        if (!string.IsNullOrEmpty(g.AgendaDocID))
                        {
                            string ImageName = g.AgendaDocID.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.AgendaDocID = path + ImageName;
                        }
                        if (!string.IsNullOrEmpty(g.MOMDocID))
                        {
                            string ImageName = g.MOMDocID.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.MOMDocID = path + ImageName;
                        }
                    }
                }


                ClsAlbumListOutput galleryList = new ClsAlbumListOutput();
                galleryList.newAlbums = NewMemberList;
                //galleryList.TotalList = TotalList;

                return(galleryList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// Get SubGrp Directory
        /// </summary>
        /// <param name="sub"></param>
        /// <returns></returns>

        public static SubGrpDirectoryResult GetSubGroupDirectory(SubGrpDirectoryInput sub)
        {
            string subGrpIDs = "";
            SubGrpDirectoryResult directory = new SubGrpDirectoryResult();

            try
            {
                // Check if member is group Admin


                MySqlParameter[] param = new MySqlParameter[3];
                param[0]           = new MySqlParameter("?grpId", sub.groupId);
                param[1]           = new MySqlParameter("?profileID", sub.profileId);
                param[2]           = new MySqlParameter("?IsAdmin", "0");
                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(',');

                    // Member Is subGroup Admin return subgrp List
                    if (Convert.ToInt32(param[2].Value.ToString()) > 0 && subGrpIDs != "")
                    {
                        if (sub.parentID == "0")
                        {
                            MySqlParameter[] param1 = new MySqlParameter[4];
                            param1[0] = new MySqlParameter("?grpId", sub.groupId);
                            param1[1] = new MySqlParameter("?profileID", sub.profileId);
                            param1[2] = new MySqlParameter("?subGrpIds", subGrpIDs);
                            param1[3] = new MySqlParameter("?parentID", sub.parentID);
                            var subgrpList = _DbTouchbase.ExecuteStoreQuery <SubGrpListResult>("V4_USPGetSubGrpList(?grpId,?profileID,?subGrpIds,?parentID)", param1).ToList();
                            directory.subGrpList = subgrpList;
                        }

                        else
                        {
                            MySqlParameter[] param2 = new MySqlParameter[3];
                            param2[0] = new MySqlParameter("?grpId", sub.groupId);
                            param2[1] = new MySqlParameter("?profileID", sub.profileId);
                            param2[2] = new MySqlParameter("?parentID", sub.parentID);
                            DataSet dsSubgrpList = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V4_USPGetSubGrpDetails", param2);
                            if (dsSubgrpList != null)
                            {
                                if (dsSubgrpList.Tables[0].Rows.Count > 0)
                                {
                                    List <SubGrpListResult> subgrpList = GlobalFuns.DataTableToList <SubGrpListResult>(dsSubgrpList.Tables[0]);
                                    directory.subGrpList = subgrpList;
                                }
                                if (dsSubgrpList.Tables[1].Rows.Count > 0)
                                {
                                    List <MemberList> memList = GlobalFuns.DataTableToList <MemberList>(dsSubgrpList.Tables[1]);

                                    foreach (MemberList mem in memList)
                                    {
                                        if (!string.IsNullOrEmpty(mem.pic))
                                        {
                                            string ImageName = mem.pic.ToString();
                                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                            mem.pic = path + ImageName;
                                        }
                                    }

                                    directory.memberList = memList;
                                }
                            }
                        }
                    }
                    //IF Member Is Not an Admin Then return Member Directory
                    else if (param[2].Value.ToString() == "0" && subGrpIDs != "")
                    {
                        MySqlParameter[] param3 = new MySqlParameter[3];
                        param3[0] = new MySqlParameter("?grpId", sub.groupId);
                        param3[1] = new MySqlParameter("?profileID", sub.profileId);
                        param3[2] = new MySqlParameter("?subGrpIds", subGrpIDs);
                        var memberList = _DbTouchbase.ExecuteStoreQuery <MemberList>("CALL V4_USPGetSubGrpMemberList(?grpId,?profileID,?subGrpIds)", param3).ToList();
                        foreach (MemberList mem in memberList)
                        {
                            if (!string.IsNullOrEmpty(mem.pic))
                            {
                                string ImageName = mem.pic.ToString();
                                string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/directory/";
                                mem.pic = path + ImageName;
                            }
                        }
                        directory.memberList = memberList;
                    }
                }
            }
            catch
            {
                throw;
            }
            if (directory.memberList == null)
            {
                directory.memberList = new List <MemberList>();
            }
            if (directory.subGrpList == null)
            {
                directory.subGrpList = new List <SubGrpListResult>();
            }
            return(directory);
        }
Пример #26
0
        public static ClsGetShowcaseDetailsOutPut GetShowcaseDetails(GetShowcaseDetails clschowcase)
        {
            try
            {
                string sqlProc;

                sqlProc = "V1_1_USPGetShowcaseDetails";

                MySqlParameter[] parameterList = new MySqlParameter[1];
                parameterList[0] = new MySqlParameter("?DistrictID", clschowcase.DistrictID);
                //parameterList[1] = new MySqlParameter("?ProfileID", monthCal.profileId);
                //parameterList[2] = new MySqlParameter("?Curr_Date", monthCal.selectedDate);
                //parameterList[3] = new MySqlParameter("?UpdatedOn", monthCal.updatedOn);

                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);



                ClsGetShowcaseDetailsOutPut showcase = new ClsGetShowcaseDetailsOutPut();
                if (clschowcase.DistrictID == "0")
                {
                    //Inserted One row for ALL as per told rupesh
                    DataTable dt_Category = new DataTable();
                    if (result.Tables[0].Rows.Count > 0)
                    {
                        //DataRow toInsert_Category = result.Tables[0].NewRow();
                        //result.Tables[0].Rows.Add("0", "All", "");
                        DataView dv_Category = result.Tables[0].DefaultView;
                        dv_Category.Sort = "ID ASC";
                        dt_Category      = dv_Category.ToTable();
                        DataRow toInsert_Category1 = dt_Category.NewRow();
                        dt_Category.Rows.Add("-1", "Others", "");
                    }

                    //Inserted One row for ALL as per told rupesh
                    DataTable dt_Club = new DataTable();
                    if (result.Tables[1].Rows.Count > 0)
                    {
                        DataRow toInsert_Club = result.Tables[1].NewRow();
                        result.Tables[1].Rows.Add("0", "All", "");
                        DataView dv_Club = result.Tables[1].DefaultView;
                        dv_Club.Sort = "ID ASC";
                        dt_Club      = dv_Club.ToTable();
                    }

                    //Inserted One row for ALL as per told rupesh
                    DataTable dt_District = new DataTable();
                    if (result.Tables[2].Rows.Count > 0)
                    {
                        DataRow toInsert_District = result.Tables[2].NewRow();
                        result.Tables[2].Rows.Add("0", "All", "");
                        DataView dv_District = result.Tables[2].DefaultView;
                        dv_District.Sort = "ID ASC";
                        dt_District      = dv_District.ToTable();
                    }

                    DataTable dtCategory = dt_Category;
                    DataTable dtClub     = dt_Club;
                    DataTable dtDistrict = dt_District;

                    List <GetShowcaseDetails> CategoryList = new List <GetShowcaseDetails>();
                    if (dtCategory.Rows.Count > 0)
                    {
                        CategoryList = GlobalFuns.DataTableToList <GetShowcaseDetails>(dtCategory);
                    }
                    List <GetShowcaseDetails> ClubList = new List <GetShowcaseDetails>();
                    if (dtClub.Rows.Count > 0)
                    {
                        ClubList = GlobalFuns.DataTableToList <GetShowcaseDetails>(dtClub);
                    }
                    List <GetShowcaseDetails> DistrictList = new List <GetShowcaseDetails>();
                    if (dtDistrict.Rows.Count > 0)
                    {
                        DistrictList = GlobalFuns.DataTableToList <GetShowcaseDetails>(dtDistrict);
                    }

                    showcase.District   = DistrictList;
                    showcase.Club       = ClubList;
                    showcase.Categories = CategoryList;
                }
                else
                {
                    //Inserted One row for ALL as per told rupesh
                    DataTable dt_Club = new DataTable();
                    if (result.Tables[0].Rows.Count > 0)
                    {
                        DataRow toInsert_Club = result.Tables[0].NewRow();
                        result.Tables[0].Rows.Add("0", "All", "");
                        DataView dv_Club = result.Tables[0].DefaultView;
                        dv_Club.Sort = "ID ASC";
                        dt_Club      = dv_Club.ToTable();
                    }

                    //DataTable dtClub = result.Tables[0];

                    List <GetShowcaseDetails> CategoryList = new List <GetShowcaseDetails>();

                    List <GetShowcaseDetails> ClubList = new List <GetShowcaseDetails>();
                    if (dt_Club.Rows.Count > 0)
                    {
                        ClubList = GlobalFuns.DataTableToList <GetShowcaseDetails>(dt_Club);
                    }

                    List <GetShowcaseDetails> DistrictList = new List <GetShowcaseDetails>();


                    showcase.District   = DistrictList;
                    showcase.Club       = ClubList;
                    showcase.Categories = CategoryList;
                }
                return(showcase);
            }
            catch
            {
                throw;
            }
        }
Пример #27
0
        //private static TouchBaseWebAPI.Data.row_productionEntities _DBTouchbase = new TouchBaseWebAPI.Data.row_productionEntities();

        public static ClsAlbumListOutput GetGalleryList(ClsAlbumListInput gallery)
        {
            try
            {
                MySqlParameter[] parameterList = new MySqlParameter[4];

                parameterList[0] = new MySqlParameter("?ProfileId", gallery.profileId);
                parameterList[1] = new MySqlParameter("?GroupId", gallery.groupId);
                parameterList[2] = new MySqlParameter("?UpdatedOn", gallery.updatedOn);
                parameterList[3] = new MySqlParameter("?ModuleID", gallery.moduleId);
                // parameterList[3] = new MySqlParameter("?UpdatedOn", gallery.updatedOn);

                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V6_1_USPGalleryList", parameterList);

                DataTable dtNewAlbums     = result.Tables[0];
                DataTable dtUpdatedAlbums = result.Tables[1];
                DataTable dtDeletedAlbums = result.Tables[2];

                List <ClsAlbumList> NewMemberList = new List <ClsAlbumList>();
                if (dtNewAlbums.Rows.Count > 0)
                {
                    NewMemberList = GlobalFuns.DataTableToList <ClsAlbumList>(dtNewAlbums);

                    foreach (ClsAlbumList g in NewMemberList)
                    {
                        if (!string.IsNullOrEmpty(g.image))
                        {
                            string ImageName = g.image.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.image = path + ImageName;
                        }
                    }
                }

                List <ClsAlbumList> updatedMemberList = new List <ClsAlbumList>();
                if (dtUpdatedAlbums.Rows.Count > 0)
                {
                    updatedMemberList = GlobalFuns.DataTableToList <ClsAlbumList>(dtUpdatedAlbums);

                    foreach (ClsAlbumList g in updatedMemberList)
                    {
                        if (!string.IsNullOrEmpty(g.image))
                        {
                            string ImageName = g.image.ToString();
                            string path      = ConfigurationManager.AppSettings["imgPath"] + "Documents/gallery/Group" + g.groupId + "/";
                            g.image = path + ImageName;
                        }
                    }
                }

                ClsAlbumListOutput galleryList = new ClsAlbumListOutput();

                galleryList.deletedAlbums = dtDeletedAlbums.Rows[0]["GalleryId"].ToString();
                galleryList.newAlbums     = NewMemberList;
                galleryList.updatedAlbums = updatedMemberList;

                return(galleryList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #28
0
        public object GetGroupSetting(GetGroup grp)
        {
            dynamic       TBGroupSettingResult;
            List <object> AllTBSettingResults = new List <object>();

            try
            {
                DataSet Result = Setting.getGroupSetting(grp);

                DataTable dtmain = Result.Tables[0];
                DataTable dt2    = Result.Tables[1];

                //string isMob, isEmail, isPersonal, isFamily, isBusiness;
                string isMobileSelf, isMobileOther, isEmailSelf, isEmailOther;

                //isMob = dt2.Rows[0]["isMob"].ToString();
                //isEmail = dt2.Rows[0]["isEmail"].ToString();
                //isPersonal = dt2.Rows[0]["isPersonal"].ToString();
                //isFamily = dt2.Rows[0]["isFamily"].ToString();
                //isBusiness = dt2.Rows[0]["isBusiness"].ToString();

                isMobileSelf  = dt2.Rows[0]["show_mobile_self_club"].ToString();
                isMobileOther = dt2.Rows[0]["show_mobile_other_club"].ToString();
                isEmailSelf   = dt2.Rows[0]["show_email_self_club"].ToString();
                isEmailOther  = dt2.Rows[0]["show_email_other_club"].ToString();

                //Convert DataTable into List
                List <GRpSettingDetails> GroupSetting = new List <GRpSettingDetails>();
                if (dtmain.Rows.Count > 0)
                {
                    GroupSetting = GlobalFuns.DataTableToList <GRpSettingDetails>(dtmain);
                }

                //Add List into another List
                for (int i = 0; i < GroupSetting.Count; i++)
                {
                    AllTBSettingResults.Add(new { GRpSettingDetails = GroupSetting[i] });
                }

                if (AllTBSettingResults != null)
                {
                    //TBGroupSettingResult = new { status = "0", message = "success", isMob = isMob, isEmail = isEmail, isPersonal = isPersonal, isFamily = isFamily, isBusiness = isBusiness, GRpSettingResult = AllTBSettingResults };
                    TBGroupSettingResult = new
                    {
                        status  = "0",
                        message = "success",

                        isMobileSelf  = isMobileSelf,
                        isMobileOther = isMobileOther,
                        isEmailSelf   = isEmailSelf,
                        isEmailOther  = isEmailOther,

                        GRpSettingResult = AllTBSettingResults
                    };
                }
                else
                {
                    TBGroupSettingResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBGroupSettingResult = new { status = "1", message = "failed" };
            }

            return(new { TBGroupSettingResult });
        }
Пример #29
0
        public static ClsMonthCalenderOutputNew GetMonthEventTypeList(ClsMonthCalenderInput monthCal)
        {
            try
            {
                string sqlProc;
                if (monthCal.groupCategory == "2")
                {
                    sqlProc = "V8_USPGetDistrictEventByMonth_Calender";
                }
                else
                {
                    sqlProc = "V8_USPGetEventByMonth_Calender";
                }

                MySqlParameter[] parameterList = new MySqlParameter[5];

                parameterList[0] = new MySqlParameter("?GroupID", monthCal.groupId);
                parameterList[1] = new MySqlParameter("?ProfileID", monthCal.profileId);
                parameterList[2] = new MySqlParameter("?Curr_Date", monthCal.selectedDate);
                parameterList[3] = new MySqlParameter("?Type", monthCal.Type);

                DataSet   result      = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);
                DataTable dtNewEvents = result.Tables[0];

                List <clsCalenderEventList> NewEventList = new List <clsCalenderEventList>();
                if (dtNewEvents.Rows.Count > 0)
                {
                    NewEventList = GlobalFuns.DataTableToList <clsCalenderEventList>(dtNewEvents);
                }

                //if (monthCal.Type == "E")
                //{
                foreach (clsCalenderEventList eve in NewEventList)
                {
                    if (!string.IsNullOrEmpty(eve.eventImg))
                    {
                        string event_Image = eve.eventImg.ToString();
                        // string path = HttpContext.Current.Server.MapPath("~/Documents/Events/Group" + grpID + "/thumb/");
                        string path = ConfigurationManager.AppSettings["imgPath"] + "Documents/Event/Group" + monthCal.groupId + "/";
                        eve.eventImg = path + event_Image;
                    }

                    DataSet result1 = null;
                    List <clsCalenderMobileNo> MobileNoList = new List <clsCalenderMobileNo>();
                    List <clsCalenderEmailId>  EmailIdsList = new List <clsCalenderEmailId>();

                    List <clsCalenderMobileNo> ListResult  = new List <clsCalenderMobileNo>();
                    List <clsCalenderEmailId>  ListResult1 = new List <clsCalenderEmailId>();

                    if (monthCal.Type != "E")
                    {
                        //if (string.IsNullOrEmpty(eve.ContactNumber))
                        //{
                        sqlProc       = "V8_USPGetCalenderEvent_MobileNoEmailIds_New";
                        parameterList = new MySqlParameter[2];
                        if (monthCal.groupCategory == "2")
                        {
                            parameterList[0] = new MySqlParameter("?UniqueID", eve.MemberID.Substring(1));
                        }
                        else
                        {
                            parameterList[0] = new MySqlParameter("?UniqueID", eve.MemberID);
                        }
                        parameterList[1] = new MySqlParameter("?Type", "M");

                        result1 = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);

                        if (result1 != null)
                        {
                            MobileNoList = GlobalFuns.DataTableToList <clsCalenderMobileNo>(result1.Tables[0]);
                        }

                        //if (MobileNoList.Count > 0)
                        //{
                        //    ListResult.Add(MobileNoList[0]);
                        //}
                        //}
                        //else if (string.IsNullOrEmpty(eve.EmailId))
                        //{
                        sqlProc       = "V8_USPGetCalenderEvent_MobileNoEmailIds_New";
                        parameterList = new MySqlParameter[2];
                        if (monthCal.groupCategory == "2")
                        {
                            parameterList[0] = new MySqlParameter("?UniqueID", eve.MemberID.Substring(1));
                        }
                        else
                        {
                            parameterList[0] = new MySqlParameter("?UniqueID", eve.MemberID);
                        }
                        parameterList[1] = new MySqlParameter("?Type", "E");

                        result1 = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, sqlProc, parameterList);

                        if (result1 != null)
                        {
                            EmailIdsList = GlobalFuns.DataTableToList <clsCalenderEmailId>(result1.Tables[0]);
                        }

                        //if (EmailIdsList.Count > 0)
                        //{
                        //    ListResult1.Add(EmailIdsList[0]);
                        //}
                        //}

                        eve.EmailIds = EmailIdsList;
                        eve.MobileNo = MobileNoList;
                    }
                    else
                    {
                        eve.EmailIds = EmailIdsList;
                        eve.MobileNo = MobileNoList;
                    }
                }


                //}

                ClsMonthCalenderOutputNew calender = new ClsMonthCalenderOutputNew();
                calender.Events = NewEventList;

                return(calender);
            }
            catch
            {
                throw;
            }
        }
        // For Offline data fetch
        public static ServiceDirector GetServiceDirectoryListSync(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);

                DataSet result = MySqlHelper.ExecuteDataset(GlobalVar.strAppConn, CommandType.StoredProcedure, "V6_USPGetServiceDirectoryListSync", param); // Added by Nandu on 30/09/2016 Task--> Module replica

                DataTable dtNewServiceMember     = result.Tables[0];
                DataTable dtUpdatedServiceMember = result.Tables[1];
                DataTable dtDeletedServiceMember = result.Tables[2];

                List <ServiceDirectoryList> NewMemberList = new List <ServiceDirectoryList>();
                if (dtNewServiceMember.Rows.Count > 0)
                {
                    NewMemberList = GlobalFuns.DataTableToList <ServiceDirectoryList>(dtNewServiceMember);

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

                List <ServiceDirectoryList> updatedMemberList = new List <ServiceDirectoryList>();
                if (dtUpdatedServiceMember.Rows.Count > 0)
                {
                    updatedMemberList = GlobalFuns.DataTableToList <ServiceDirectoryList>(dtUpdatedServiceMember);

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

                List <ServiceDirectoryList> deletedMemberList = new List <ServiceDirectoryList>();
                if (dtDeletedServiceMember.Rows.Count > 0)
                {
                    deletedMemberList = GlobalFuns.DataTableToList <ServiceDirectoryList>(dtDeletedServiceMember);
                }

                ServiceDirector serviceList = new ServiceDirector();

                serviceList.deletedMembers = deletedMemberList;
                serviceList.newMembers     = NewMemberList;
                serviceList.updatedMembers = updatedMemberList;

                return(serviceList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }