Example #1
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));
        }
Example #2
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");
        }