public async Task <LoginTokenDataModel> AddExternalUser(ExternalUserModel addUserModel)
        {
            try
            {
                if (addUserModel != null)
                {
                    List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                    {
                        new KeyValuePair <string, object>("@dob", addUserModel.Dob),
                        new KeyValuePair <string, object>("@gender", addUserModel.Gender),
                        new KeyValuePair <string, object>("@firstName", addUserModel.FirstName),
                        new KeyValuePair <string, object>("@lastName", addUserModel.LastName),
                        new KeyValuePair <string, object>("@email", addUserModel.Email),
                        new KeyValuePair <string, object>("@mobile", addUserModel.Mobile),
                        new KeyValuePair <string, object>("@Provider", addUserModel.Provider),
                        new KeyValuePair <string, object>("@ProviderKey", addUserModel.ProviderKey)
                    };
                    SigninDetails   signinDetails   = new SigninDetails();
                    CredentialModel credentialModel = new CredentialModel()
                    {
                        isExternal = true, UserName = addUserModel.Email
                    };


                    DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_AddExternalUser, param);

                    return(signinDetails.CheckUserCredentials(credentialModel));
                }
                return(new LoginTokenDataModel());
            }
            catch (Exception ex)
            {
                return(new LoginTokenDataModel());
            }
        }
        public string UpdateUser(UserModel addUserModel)
        {
            if (addUserModel != null)
            {
                if (addUserModel != null)
                {
                    FileManager fileManager = new FileManager();
                    var         filemodel   = fileManager.SaveFile(addUserModel.File, _rootPath);
                    List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                    {
                        new KeyValuePair <string, object>("@userName", addUserModel.UserName),
                        new KeyValuePair <string, object>("@roleId", addUserModel.RoleId),
                        new KeyValuePair <string, object>("@firstName", addUserModel.FirstName),
                        new KeyValuePair <string, object>("@lastName", addUserModel.LastName),
                        new KeyValuePair <string, object>("@createdBy", addUserModel.CreatedBy),
                        new KeyValuePair <string, object>("@email", addUserModel.Email),
                        new KeyValuePair <string, object>("@mobile", addUserModel.Mobile),
                        new KeyValuePair <string, object>("@userId", addUserModel.UserId),

                        new KeyValuePair <string, object>("@dob", addUserModel.Dob),
                        new KeyValuePair <string, object>("@gender", addUserModel.Gender),
                        new KeyValuePair <string, object>("@photo", filemodel?.FileFullpath ?? string.Empty),
                    };
                    List <string> tolist = new List <string>()
                    {
                        addUserModel.Email
                    };
                    SendUserCreationMail(tolist, $"{addUserModel.FirstName} {addUserModel.LastName}", addUserModel.AppName);
                    return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateUser, param));
                }
            }
            return(UtilityConstant.UserResponseStatus.Error);
        }
예제 #3
0
        public string SaveContactDetails(ContactDetailModel contactDetailModel)
        {
            if (contactDetailModel != null)
            {
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@ContactTitle", contactDetailModel.ContactTitle),
                    new KeyValuePair <string, object>("@ContactDescription", contactDetailModel.ContactDescription),
                    new KeyValuePair <string, object>("@Address", contactDetailModel.Address),
                    new KeyValuePair <string, object>("@Mobile", contactDetailModel.Mobile),
                    new KeyValuePair <string, object>("@Email", contactDetailModel.Email),
                    new KeyValuePair <string, object>("@ConsultationMethods", contactDetailModel.ConsultationMethods),
                    new KeyValuePair <string, object>("@UserId", contactDetailModel.UserId),

                    new KeyValuePair <string, object>("@GoogleLink", contactDetailModel.GoogleLink),
                    new KeyValuePair <string, object>("@FacebookLink", contactDetailModel.FacebookLink),
                    new KeyValuePair <string, object>("@TwitterLink", contactDetailModel.TwitterLink),
                    new KeyValuePair <string, object>("@InstagramLink", contactDetailModel.InstagramLink),
                    new KeyValuePair <string, object>("@YoutubeLink", contactDetailModel.YoutubeLink)
                };

                return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SaveContactDetails, param));
            }
            return(UtilityConstant.UserResponseStatus.Error);
        }
예제 #4
0
        public string UpdateFeedback(FeedbackModel feedbackModel)
        {
            if (feedbackModel != null)
            {
                string imgData = string.Empty;
                if (feedbackModel.File != null)
                {
                    List <FileModel> fileModels = GetFileData(new List <IFormFile>()
                    {
                        feedbackModel.File
                    }, FileType.Image);

                    if (fileModels.Count > 0)
                    {
                        imgData = fileModels[0].DataBase64;
                    }
                }
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@id", feedbackModel.Id),
                    new KeyValuePair <string, object>("@feedback", feedbackModel.Feedback),
                    new KeyValuePair <string, object>("@photo", imgData.IndexOf("data:image/png;base64, ") > -1?imgData:"data:image/png;base64, " + imgData),
                    new KeyValuePair <string, object>("@username", feedbackModel.Username),
                    new KeyValuePair <string, object>("@source", feedbackModel.Source),
                    new KeyValuePair <string, object>("@UserId", feedbackModel.UserId)
                };

                return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateFeedback, param));
            }
            return(UtilityConstant.UserResponseStatus.Error);
        }
 public string UpdateMenu(MenuModel menuModel)
 {
     try
     {
         List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
         {
             new KeyValuePair <string, object>("@menuName", menuModel.MenuName),
             new KeyValuePair <string, object>("@menuDisplayName", menuModel.DisplayName),
             new KeyValuePair <string, object>("@position", menuModel.Position),
             new KeyValuePair <string, object>("@url", menuModel.MenuPath ?? string.Empty),
             new KeyValuePair <string, object>("@iconColor", menuModel.IconColor),
             new KeyValuePair <string, object>("@iconClass", menuModel.IconClass),
             new KeyValuePair <string, object>("@displayOrder", menuModel.DisplayOrder),
             new KeyValuePair <string, object>("@parentMenuId", menuModel.ParentMenuId),
             new KeyValuePair <string, object>("@userId", menuModel.UserId),
             new KeyValuePair <string, object>("@Badge", menuModel.Badge),
             new KeyValuePair <string, object>("@accessBy", menuModel.AccessBy),
             new KeyValuePair <string, object>("@menuId", menuModel.MenuId)
         };
         return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateMenu, param));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
 public string UpdateAppDowntime(DowntimeModel downtimeModel)
 {
     try
     {
         if (downtimeModel != null)
         {
             List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
             {
                 new KeyValuePair <string, object>("@FromTime", downtimeModel.FromTime),
                 new KeyValuePair <string, object>("@ToTime", downtimeModel.ToTime),
                 new KeyValuePair <string, object>("@UserId", downtimeModel.UserId),
                 new KeyValuePair <string, object>("@Id", downtimeModel.Id),
                 new KeyValuePair <string, object>("@Message", downtimeModel.Message)
             };
             return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateAppDowntime, param));
         }
         else
         {
             return(UtilityConstant.UserResponseStatus.NoDataFromClient);
         }
     }
     catch (Exception ex)
     {
         return(UtilityConstant.UserResponseStatus.Error);
     }
 }
        public List <MenuModel> GetMenu(int menuId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@MenuId", menuId)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.GetLayoutMenu, param).ToList <MenuModel>());
        }
예제 #8
0
        public string SaveAstrologerSchedule(List <AstrologerScheduleModel> model)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@db", model.ToDataTable())
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SaveAstrologerSchedule, param));
        }
예제 #9
0
        public DataTable GetEmailConfig(string ConfigName)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ConfigName", ConfigName)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetEmailConfig, param));
        }
        public List <RefLookupModel> GetReferenceLookup(string key)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@key", key)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetReferenceLookup, param).ToList <RefLookupModel>());
        }
예제 #11
0
        public List <AstrologerModel> GetAstrologers(int astrologerId = 0)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@astrologerId", astrologerId)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetAstrologers, param).ToList <AstrologerModel>());
        }
        public List <DowntimeModel> GetAppDowntime(int DowntimeId = 0)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@id", DowntimeId)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetAppDowntime, param).ToList <DowntimeModel>());
        }
예제 #13
0
        public List <UserQueryModel> GetUserQuery(string status = null)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@status", status)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetUserQuery, param).ToList <UserQueryModel>());
        }
예제 #14
0
        public string ResolveUserQuery(int queryId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@queryId", queryId)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_ResolveUserQuery, param));
        }
예제 #15
0
        public List <ZodiacReportModel> GetZodiacReport(int zodiacReportId = 0)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ZodiacReportId", zodiacReportId)
            };

            return(DataExecutor.ExecuteDataTable(Utilities.UtilityConstant.Procedures.Mst_GetZodiacReport, param).ToList <ZodiacReportModel>());
        }
        public DataTable GetUser(int userId = 0)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@UserId", userId)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetUsers, param));
        }
        public DataTable DropdownList(string key)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@key", key)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_DropdownList, param));
        }
        public EmailSaveTemplateModel GetEmailTemplate(int templateId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@templateId", templateId)
            };

            return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_GetEmailTemplateById, param).ToList <EmailSaveTemplateModel>().FirstOrDefault());
        }
예제 #19
0
        public string DeleteEmailConfig(int configId, int userId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ConfigId", configId),
                new KeyValuePair <string, object>("@UserId", userId)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteEmailConfig, param));
        }
        public string DeleteUser(int modifiedBy, int userId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", userId),
                new KeyValuePair <string, object>("@modifiedBy", modifiedBy)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteUser, param));
        }
        public string DeleteReferenceLookup(RefLookupModel model)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@UserId", model.UserId),
                new KeyValuePair <string, object>("@Id", model.Id)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteReferenceLookup, param));
        }
        public string DeleteRoles(int roleId, int userId)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", userId),
                new KeyValuePair <string, object>("@roleId", roleId)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteRoles, param));
        }
        public string DeleteMenu(MenuModel menuModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", menuModel.UserId),
                new KeyValuePair <string, object>("@menuId", menuModel.MenuId)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteMenu, param));
        }
예제 #24
0
        public string DeleteAstrologers(AstrologerModel model)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", model.UserId),
                new KeyValuePair <string, object>("@astrologerId", model.AstrologerId),
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteAstrologers, param));
        }
예제 #25
0
        public string UpdateEmailGroup(string groupName, string emails)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@groupname", groupName),
                new KeyValuePair <string, object>("@emails", emails)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Usp_Mst_UpdateEmailGroup, param));
        }
        public object GetHoroscope(string reportType, DateTime date, int id)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@reportType", reportType),
                new KeyValuePair <string, object>("@date", date),
                new KeyValuePair <string, object>("@zodiacId", id)
            };

            return(DataExecutor.ExecuteDataSet(UtilityConstant.Procedures.Mst_GetHoroscope, param));
        }
 public DowntimeModel HasAppDowntime()
 {
     try
     {
         return(DataExecutor.ExecuteDataTable(UtilityConstant.Procedures.Mst_HasAppDowntime).ToList <DowntimeModel>().FirstOrDefault());
     }
     catch (Exception ex)
     {
         return(new DowntimeModel());
     }
 }
예제 #28
0
        public string ChangePassword(ChangePasswordModel changePasswordModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@username", changePasswordModel.UserName),
                new KeyValuePair <string, object>("@oldpassword", EncryptManager.GetHashString(changePasswordModel.OldPassword ?? string.Empty)),
                new KeyValuePair <string, object>("@newpassword", EncryptManager.GetHashString(changePasswordModel.NewPassword ?? string.Empty))
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Usp_ChangePassword, param));
        }
예제 #29
0
        public string SetDefaultEmailConfig(int configId, int userId, bool status)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ConfigId", configId),
                new KeyValuePair <string, object>("@UserId", userId),
                new KeyValuePair <string, object>("@Status", status)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SetDefaultEmailConfig, param));
        }
        public string ActiveDeactiveUser(int modifiedBy, int userId, bool status)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", userId),
                new KeyValuePair <string, object>("@modifiedBy", modifiedBy),
                new KeyValuePair <string, object>("@status", status)
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_ActiveDeactiveUser, param));
        }