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;
     }
 }
Exemplo n.º 2
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);
        }
        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);
        }
Exemplo n.º 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 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 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);
     }
 }
Exemplo n.º 7
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));
        }
Exemplo n.º 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));
        }
        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 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 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));
        }
Exemplo n.º 12
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));
        }
Exemplo n.º 13
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));
        }
        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));
        }
Exemplo n.º 15
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));
        }
Exemplo n.º 16
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));
        }
Exemplo n.º 18
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));
        }
        public string AddRoles(AddRoleModel addRoleModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@roleName", addRoleModel.RoleName),
                new KeyValuePair <string, object>("@roleDisplayName", addRoleModel.RoleDisplayName),
                new KeyValuePair <string, object>("@userId", addRoleModel.UserId),
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_AddRoles, param));
        }
Exemplo n.º 20
0
        public string SaveZodiac(ZodiacModel zodiacModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@NameEng", zodiacModel.NameEng),
                new KeyValuePair <string, object>("@NameHindi", zodiacModel.NameHindi),
                new KeyValuePair <string, object>("@UserId", zodiacModel.UserId),
                new KeyValuePair <string, object>("@Logo", zodiacModel.Logo),
            };

            return(DataExecutor.ExecuteScalar(Utilities.UtilityConstant.Procedures.Mst_GetZodiac, param));
        }
        public string SaveEmailTemplate(EmailSaveTemplateModel emailSaveTemplateModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@userId", emailSaveTemplateModel.UserId),
                new KeyValuePair <string, object>("@EmailTemplate", emailSaveTemplateModel.EmailTemplate),
                new KeyValuePair <string, object>("@EmailTemplateName", emailSaveTemplateModel.EmailTemplateName),
                new KeyValuePair <string, object>("@Subject", emailSaveTemplateModel.Subject),
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_AddEmailTemplate, param));
        }
        public bool IsDataExists(string key, string value)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@key", key),
                new KeyValuePair <string, object>("@value", value)
            };
            var result = DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_IsDataExists, param);

            bool.TryParse(result, out bool isExists);
            return(isExists);
        }
Exemplo n.º 23
0
        public string SaveEmailConfig(EmailConfigModel emailConfigModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ConfigName", emailConfigModel.ConfigName),
                new KeyValuePair <string, object>("@ServerName", emailConfigModel.ServerName),
                new KeyValuePair <string, object>("@Port", emailConfigModel.Port),
                new KeyValuePair <string, object>("@Username", emailConfigModel.UserName),
                new KeyValuePair <string, object>("@Password", emailConfigModel.Password),
                new KeyValuePair <string, object>("@UserId", emailConfigModel.UserId),
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SaveEmailConfig, param));
        }
Exemplo n.º 24
0
        public string SaveZodiacReport(ZodiacReportModel zodiacReportModel)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@ZodiacId", zodiacReportModel.ZodiacId),
                new KeyValuePair <string, object>("@ReportType", zodiacReportModel.ReportType),
                new KeyValuePair <string, object>("@UserId", zodiacReportModel.UserId),
                new KeyValuePair <string, object>("@Description", zodiacReportModel.Description),
                new KeyValuePair <string, object>("@RangeFrom", zodiacReportModel.RangeFrom),
                new KeyValuePair <string, object>("@RangeTo", zodiacReportModel.RangeTo),
            };

            return(DataExecutor.ExecuteScalar(Utilities.UtilityConstant.Procedures.Mst_SaveZodiacReport, param));
        }
Exemplo n.º 25
0
        public string UpdateAstrologerSchedule(AstrologerScheduleModel model)
        {
            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
            {
                new KeyValuePair <string, object>("@astrologerId", model.AstrologerId),
                new KeyValuePair <string, object>("@ScheduleId", model.ScheduleId),
                new KeyValuePair <string, object>("@Day", model.Day),
                new KeyValuePair <string, object>("@FromTime", model.FromTime),
                new KeyValuePair <string, object>("@ToTime", model.ToTime),
                new KeyValuePair <string, object>("@Remark", model.Remarks),
                new KeyValuePair <string, object>("@Is24hours", model.Is24hours),
                new KeyValuePair <string, object>("@userId", model.UserId),
            };

            return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateAstrologerSchedule, param));
        }
Exemplo n.º 26
0
 public string SetAppSetting(AppSettingModel appSettingData)
 {
     try
     {
         var fileModels = new List <FileModel>();
         if (appSettingData != null)
         {
             if (appSettingData.File != null)
             {
                 fileModels = GetFileData(new List <IFormFile>()
                 {
                     appSettingData.File
                 }, FileType.Image);
             }
             string imgData = appSettingData.Image;
             if (fileModels.Count > 0)
             {
                 imgData = fileModels[0].DataBase64;
             }
             if (fileModels != null)
             {
                 List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                 {
                     new KeyValuePair <string, object>("@AppLogo", imgData.Replace(@"data:image/png;base64, ", "")),
                     new KeyValuePair <string, object>("@AppName", appSettingData.AppName ?? "श्री आदित्य ज्योतिष केंद्र"),
                     new KeyValuePair <string, object>("@UserId", appSettingData.UserId),
                     new KeyValuePair <string, object>("@DefaultPassword", appSettingData.DefaultPassword),
                     new KeyValuePair <string, object>("@ResetLinkValidity", appSettingData.ResetLinkValidity),
                     new KeyValuePair <string, object>("@DefaultPasswordHash", EncryptManager.GetHashString(appSettingData.DefaultPassword)),
                 };
                 return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateAppSetting, param));
             }
             else
             {
                 return(UtilityConstant.UserResponseStatus.NoDataFromClient);
             }
         }
         else
         {
             return(UtilityConstant.UserResponseStatus.NoDataFromClient);
         }
     }
     catch (Exception ex)
     {
         return(UtilityConstant.UserResponseStatus.Error);
     }
 }
Exemplo n.º 27
0
        public string DeleteFeedback(FeedbackModel feedbackModel)
        {
            if (feedbackModel != null)
            {
                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>("@ContactDescription", feedbackModel.Photo),
                    new KeyValuePair <string, object>("@Address", feedbackModel.Source),
                    new KeyValuePair <string, object>("@UserId", feedbackModel.UserId)
                };

                return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_DeleteFeedback, param));
            }
            return(UtilityConstant.UserResponseStatus.Error);
        }
        public string SaveReferenceLookup(RefLookupModel model)
        {
            List <string> lst = new List <string>();

            lst = model.Value.Split("||").ToList();
            foreach (var item in lst)
            {
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@key", model.Key),
                    new KeyValuePair <string, object>("@Value", item),
                    new KeyValuePair <string, object>("@Remark", model.Remark),
                    new KeyValuePair <string, object>("@UserId", model.UserId),
                };
                DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SaveReferenceLookup, param);
            }
            return("Saved");
        }
Exemplo n.º 29
0
        public string UpdateAstrologers(AstrologerModel model, string rootPath)
        {
            var fileModels = new List <FileModel>();

            if (model != null)
            {
                FileManager fileManager  = new FileManager();
                var         fileresponse = fileManager.SaveFile(model.File, rootPath);
                if (model.File != null)
                {
                    fileModels = GetFileData(new List <IFormFile>()
                    {
                        model.File
                    }, FileType.Image);
                }
                string imgData = string.Empty;
                if (fileModels.Count > 0)
                {
                    imgData = fileModels[0].DataBase64;
                }
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@Address", model.Address),
                    new KeyValuePair <string, object>("@ConsultOn", model.ConsultOn),
                    new KeyValuePair <string, object>("@ConsultPrice", model.ConsultPrice),
                    new KeyValuePair <string, object>("@Dob", model.Dob),
                    new KeyValuePair <string, object>("@Email", model.Email),
                    new KeyValuePair <string, object>("@Experience", model.Experience),
                    new KeyValuePair <string, object>("@Language", model.Language),
                    new KeyValuePair <string, object>("@Location", model.Location),
                    new KeyValuePair <string, object>("@Mobile", model.Mobile),
                    new KeyValuePair <string, object>("@Name", model.Name),
                    new KeyValuePair <string, object>("@Photo", fileresponse.FileFullpath),
                    new KeyValuePair <string, object>("@userId", model.UserId),
                    new KeyValuePair <string, object>("@astrologerId", model.AstrologerId),
                    new KeyValuePair <string, object>("@biography", model.Biography),
                    new KeyValuePair <string, object>("@Experties", model.Experties),
                };
                return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_UpdateAstrologers, param));
            }

            return("Error");
        }
Exemplo n.º 30
0
        public string SaveAstrologerRating(AstrologerRatingModel astrologerRatingModel)
        {
            try
            {
                List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >()
                {
                    new KeyValuePair <string, object>("@astrologerId", astrologerRatingModel.AstrologerId),
                    new KeyValuePair <string, object>("@star", astrologerRatingModel.Stars),
                    new KeyValuePair <string, object>("@review", astrologerRatingModel.Review),
                    new KeyValuePair <string, object>("@userId", astrologerRatingModel.UserId),
                };

                return(DataExecutor.ExecuteScalar(UtilityConstant.Procedures.Mst_SaveAstroRating, param));
            }
            catch (Exception ex)
            {
                throw;
            }
        }