public object UpdateProfileDetails(RootObject Input)
        {
            dynamic MemberDirectorResult;
            int     result = MemberMaster.UpdateAllProfileDetails(Input);

            if (result > 0)
            {
                string profileID = Input.profileID;
                MemberMaster.AddMemberToDistrict(profileID, profileID);

                DateTime dt = DateTime.Now;
                if (Input.updatedOn != null)
                {
                    dt = Convert.ToDateTime(Input.updatedOn);
                    dt = dt.AddSeconds(-2);
                }

                // Forward to GetMemberListSync method to get updated records
                string zipFilePath = string.Empty;
                MemberListSyncResult MemberDetail = MemberMaster.GetMemberListSync(dt.ToString("yyyy/MM/dd HH:mm:ss"), Input.grpID, out zipFilePath);

                if (!string.IsNullOrEmpty(zipFilePath))
                {
                    MemberDirectorResult = new { status = "0", message = "success", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
                else if (MemberDetail.NewMemberList.Count == 0 && MemberDetail.UpdatedMemberList.Count == 0 && string.IsNullOrEmpty(MemberDetail.DeletedMemberList))
                {
                    MemberDirectorResult = new { status = "2", message = "No New Updates", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
                else
                {
                    MemberDirectorResult = new { status = "0", message = "success", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
            }
            else
            {
                MemberDirectorResult = new { status = "1", message = "failed" };
            }
            return(MemberDirectorResult);
        }
        public object GetMemberListSync(MemberSearch member)
        {
            dynamic MemberDirectorResult;

            try
            {
                string zipFilePath;
                MemberListSyncResult MemberDetail = new MemberListSyncResult();
                if (member.grpID == "31072" & Convert.ToDateTime(member.updatedOn).Date.ToString("dd/MM/yyyy") == "01/01/1970")
                {
                    zipFilePath = "http://www.rosteronwheels.com/TempDocuments/DirectoryData/Profile10062017054630PM.zip";
                }
                else
                {
                    MemberDetail = MemberMaster.GetMemberListSync(member.updatedOn, member.grpID, out zipFilePath);
                }


                if (!string.IsNullOrEmpty(zipFilePath))
                {
                    MemberDirectorResult = new { status = "0", message = "success", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
                else if (MemberDetail.NewMemberList.Count == 0 && MemberDetail.UpdatedMemberList.Count == 0 && string.IsNullOrEmpty(MemberDetail.DeletedMemberList))
                {
                    MemberDirectorResult = new { status = "2", message = "No New Updates", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
                else
                {
                    MemberDirectorResult = new { status = "0", message = "success", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), zipFilePath, MemberDetail };
                }
            }
            catch (Exception ex)
            {
                MemberDirectorResult = new { status = "1", error = ex.ToString(), message = "An error occured. Please contact Administrator", curDate = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") };
            }
            return(MemberDirectorResult);
        }