Exemple #1
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);
        }
Exemple #2
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;
            }
        }
Exemple #3
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;
            }
        }
Exemple #4
0
        public object AddEbulletin(AddEbulletin addebulltn)
        {
            dynamic TBAddEbulletinResult;
            int     str = 0;

            try
            {
                string Result = Ebulletin.createEbulletin(addebulltn);

                if (!string.IsNullOrEmpty(Result))
                {
                    str = GlobalFuns.uploadDocs(addebulltn.grpID, Result, "ebulletin");
                }

                if (str == 0)
                {
                    TBAddEbulletinResult = new { status = "0", message = "success" };

                    if (addebulltn.ebulletinID != "0")
                    {
                        string url = ConfigurationManager.AppSettings["imgPath"] + "php/EditEbulletin.php?newsID=" + addebulltn.ebulletinID;
                        GroupMaster.Send(url);
                    }
                }
                else
                {
                    TBAddEbulletinResult = new { status = "1", message = "failed" }
                };
            }
            catch
            {
                TBAddEbulletinResult = new { status = "1", message = "failed" };
            }
            return(new { TBAddEbulletinResult });
        }
Exemple #5
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;
            }
        }
Exemple #6
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;
            }
        }
Exemple #7
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;
            }
        }
        public object UpdateProfile(MemberProfileUpdate member)
        {
            dynamic UserResult;
            int     str;
            int     UID = Convert.ToInt32(member.ProfileId);

            try
            {
                string result = MemberMaster.updateMemberDetails(member);

                if (!string.IsNullOrEmpty(result))
                {
                    str = GlobalFuns.UploadImage(result, UID, "MemberProfile");
                }
                else
                {
                    str = 0;
                }
                if (str == 0)
                {
                    UserResult = new { status = "0", message = "success" }
                }
                ;
                else
                {
                    UserResult = new { status = "1", message = "failed" }
                };
            }
            catch
            {
                UserResult = new { status = "1", message = "failed" };
            }

            return(new { UserResult });
        }
Exemple #9
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);
        }
Exemple #10
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 });
        }
Exemple #11
0
        string sendNationalOTP(string mobile, string otp)
        {
            //Smsjust Provider
            //GlobalFuns.SendSMSOnAdd(mobile, otp + " is your one time password(OTP). Please enter the OTP to proceed. Thank you," + System.Environment.NewLine + "Team ROW");

            //MVaayoo Provider
            GlobalFuns.SendAlertSMS(mobile, otp + " is your one time password(OTP). Please enter the OTP to proceed. Thank you, Team ROW");

            return("true");
        }
Exemple #12
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 });
        }
        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;
            }
        }
Exemple #15
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;
            }
        }
Exemple #16
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 });
        }
Exemple #17
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;
            }
        }
Exemple #18
0
        public object UserLogin(UserLogin user)
        {
            dynamic LoginResult;

            try
            {
                string  strOTP = GlobalFuns.CreateRandomPassword(4);
                DataSet ds     = new DataSet();

                ds = Login.GetMembersList(user);

                if (ds != null)
                {
                    if (ds.Tables[0] != null)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            bool flag = SendSMSAndEmailToUser(user, strOTP, ds.Tables[0].Rows[0]["emailId"].ToString(), ds.Tables[0].Rows[0]["memberName"].ToString(), ds.Tables[0].Rows[0]["groupName"].ToString());

                            if (flag == true)
                            {
                                LoginResult = new { status = "0", message = "success", otp = strOTP }
                            }
                            ;
                            else
                            {
                                LoginResult = new { status = "1", message = "failed", otp = 0 }
                            };
                        }
                        else
                        {
                            LoginResult = new { status = "0", message = "Member not registered", otp = 0 };
                        }
                    }
                    else
                    {
                        LoginResult = new { status = "0", message = "Member not registered", otp = 0 };
                    }
                }
                else
                {
                    LoginResult = new { status = "0", message = "Member not registered", otp = 0 };
                }
            }
            catch (Exception ex)
            {
                LoginResult = new { status = "1", message = "failed", otp = 0, error = ex.Message };
            }
            return(new { LoginResult });
        }
        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;
            }
        }
Exemple #20
0
        public object AddDocument(AddDocument adddoc)
        {
            dynamic TBAddDocumentResult;
            int     str = -1;

            try
            {
                AddDocResult Result = DocumentSafe.createDocument(adddoc);

                if (!string.IsNullOrEmpty(Result.ImgName))
                {
                    str = GlobalFuns.uploadDocs(adddoc.grpID, Result.ImgName, "documentsafe");
                }
                else
                {
                    str = 0;
                }

                if (Result != null)
                {
                    if (str == 0)
                    {
                        TBAddDocumentResult = new { status = "0", message = "success" };

                        //== Commented by Nandu on 01-03-2017 Task-> Cron set on server(notifiy on publish date)

                        //string url = ConfigurationManager.AppSettings["imgPath"] + "php/AddDocument.php?DocID=" + Result.docID;
                        //GroupMaster.Send(url);
                    }
                    else
                    {
                        TBAddDocumentResult = new { status = "1", message = "failed" }
                    };
                }
                else
                {
                    TBAddDocumentResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBAddDocumentResult = new { status = "1", message = "failed" };
            }

            return(new { TBAddDocumentResult });
        }
Exemple #21
0
        public object AddImprovement(AddImprovement addImpr)
        {
            dynamic TBAddImprovementResult;
            int     str = -1;

            try
            {
                Imgname Result = Improvement.createImprovement(addImpr);
                if (!string.IsNullOrEmpty(Result.imgName))
                {
                    str = GlobalFuns.UploadImage(addImpr.grpID, Result.imgName, "Improvement");
                }
                else
                {
                    str = 0;
                }

                if (Result != null)
                {
                    if (str == 0)
                    {
                        TBAddImprovementResult = new { status = "0", message = "success" };

                        if (addImpr.improvementID != "0")
                        {
                            string url = ConfigurationManager.AppSettings["imgPath"] + "php/EditImprovement.php?AnnID=" + addImpr.improvementID;
                            //  GroupMaster.Send(url);
                        }
                    }
                    else
                    {
                        TBAddImprovementResult = new { status = "1", message = "failed" }
                    };
                }
                else
                {
                    TBAddImprovementResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBAddImprovementResult = new { status = "1", message = "failed" };
            }

            return(new { TBAddImprovementResult });
        }
Exemple #22
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;
            }
        }
Exemple #23
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);
        }
        public object AddEvent_New(AddEventResult eventResult)
        {
            dynamic AddEventResult;
            int     str;

            try
            {
                Imgname result = EventMaster.AddEvent_New(eventResult);
                if (!string.IsNullOrEmpty(result.imgName))
                {
                    str = GlobalFuns.UploadImage(eventResult.grpID, result.imgName, "Event");
                }
                else
                {
                    str = 0;
                }
                if (result != null)
                {
                    if (str == 0)
                    {
                        AddEventResult = new { status = "0", message = "success" };
                        if (eventResult.eventID != "0")
                        {
                            //string url = ConfigurationManager.AppSettings["imgPath"] + "php/EditEvent.php?EventID=" + eventResult.eventID;
                            //GroupMaster.Send(url);
                        }
                    }
                    else
                    {
                        AddEventResult = new { status = "1", message = "failed", Exception = "1" }
                    };
                }
                else
                {
                    AddEventResult = new { status = "1", message = "failed", Exception = "2" };
                }
            }
            catch (Exception e)
            {
                AddEventResult = new { status = "1", message = "failed", Exception = e };
            }
            return(new { AddEventResult });
        }
Exemple #25
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;
            }
        }
        public object AddUpdateAlbum(ClsAddUpdateAlbumInput album)
        {
            dynamic TBAddGalleryResult;
            int     str = -1;

            try
            {
                Imgname Result = Gallery.createAlbum(album);

                if (!string.IsNullOrEmpty(Result.imgName))
                {
                    str = GlobalFuns.UploadImage(album.groupId, Result.imgName, "gallery");
                }
                else
                {
                    str = 0;
                }

                if (Result != null)
                {
                    if (str == 0)
                    {
                        TBAddGalleryResult = new { status = "0", message = "success" };
                    }
                    else
                    {
                        TBAddGalleryResult = new { status = "1", message = "failed" }
                    };
                }
                else
                {
                    TBAddGalleryResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBAddGalleryResult = new { status = "1", message = "failed" };
            }

            return(new { TBAddGalleryResult });
        }
Exemple #27
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;
            }
        }
        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;
            }
        }
Exemple #29
0
        public object Registration(RegisterMail obj)
        {
            dynamic RegistrationResult;

            try
            {
                if ((GlobalFuns.SendEmail(ConfigurationManager.AppSettings["frommail"].ToString(), "[email protected], [email protected]", "Enquiry from Roster On Wheels", mailBody(obj.MobileNo, obj.IsRotarian, obj.Name, obj.Email, obj.Club, obj.Feedback)) == ""))
                {
                    GlobalFuns.SendEmail(ConfigurationManager.AppSettings["frommail"].ToString(), Convert.ToString(obj.Email), "Thank you for Enquiry", customerMailBody());
                    RegistrationResult = new { status = "0", message = "success" };
                }
                else
                {
                    RegistrationResult = new { status = "1", message = "failed" };
                }
            }
            catch
            {
                RegistrationResult = new { status = "1", message = "failed" };
            }

            return(new { RegistrationResult });
        }
        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;
            }
        }