Example #1
0
 public TheProjectsController(ChatBotContext ctx, ILogger <TheProjectsController> logger, IPatternsRepository patternRepo, IMapper mapper)
 {
     _dbContext   = ctx;
     _logger      = logger;
     _patternRepo = patternRepo;
     _mapper      = mapper;
 }
 public GreetingsController(ChatBotContext dbContext, ILogger <GreetingsController> logger,
                            IGreetingsRepository greetingsRepo, IMapper mapper)
 {
     _dbContext     = dbContext;
     _logger        = logger;
     _greetingsRepo = greetingsRepo;
     _mapper        = mapper;
 }
 public ChatBotUnitOfWork(string connectionString, TimeSpan span, int spansCount)
 {
     _context = new ChatBotContext(connectionString);
     CommonUsersRepository    = new UsersRepository(_context);
     RegistredUsersRepository = new RegistratedUsersRepository(_context);
     MessagesRepository       = new MessagesRepository(_context, spansCount, span);
     OperatorsRepository      = new OperatorsRepository(_context);
 }
 public DefaultBotResponsesController(ChatBotContext ctx,
                                      IDefaultBotResponsesRepository defRespRepo, IMapper mapper, IValidationHelperRepository validationRepo)
 {
     _dbContext      = ctx;
     _defRespRepo    = defRespRepo;
     _mapper         = mapper;
     _validationRepo = validationRepo;
 }
Example #5
0
 public ContextWrappersController(ChatBotContext ctx, ILogger <ContextWrappersController> logger,
                                  IPatternsRepository patternRepo, IMapper mapper, IValidationHelperRepository validationRepo)
 {
     _dbContext      = ctx;
     _logger         = logger;
     _patternRepo    = patternRepo;
     _mapper         = mapper;
     _validationRepo = validationRepo;
 }
Example #6
0
 public ChatBotController(
     IAWSLexService awsLexService,
     IEmailSender emailSender,
     IStackDriverLogger stackDriverLogger,
     ChatBotContext context)
 {
     _awsLexService     = awsLexService;
     _emailSender       = emailSender;
     _stackDriverLogger = stackDriverLogger;
     _context           = context;
 }
Example #7
0
 public ActionResult GetAllQuestion()
 {
     try
     {
         ChatBotContext getAllQuest = new ChatBotContext();
         var            qlist       = getAllQuest.ChatBot.Where(e => e.IsHeader == 0).ToList();
         return(Json(new { status = true, data = qlist }));
     }
     catch (Exception ex)
     {
         return(Json(new { status = false, data = "" }));
     }
 }
Example #8
0
 public void DeleteQuestions()
 {
     try
     {
         ChatBotContext getAllQuest = new ChatBotContext();
         getAllQuest.Database.ExecuteSqlCommand("TRUNCATE TABLE Chatbot");
         Response.Redirect("Index");
     }
     catch (Exception ex)
     {
         //return Json(new { status = false, data = "" });
     }
 }
Example #9
0
        //
        // GET: /Question/

        public ActionResult Index()
        {
            ViewModel      header = new ViewModel();
            ChatBotContext db     = new ChatBotContext();

            if (db.ChatBot.Where(e => e.IsHeader == 1).ToList().Count == 0)
            {
                header.headerinfo = "";
            }
            else
            {
                header.headerinfo = db.ChatBot.Where(e => e.IsHeader == 1).FirstOrDefault().Desc;
            }
            return(View(header));
        }
Example #10
0
        public ActionResult SaveQuestion(QuestionModel quesObj)
        {
            ChatBotContext db = new ChatBotContext();

            chatbot c = new chatbot();

            c.IsHeader  = 0;
            c.Desc      = quesObj.Question;
            c.ContactId = Convert.ToInt32(quesObj.QuestionContectId);
            c.ParentId  = Convert.ToInt32(quesObj.QuestionParentId);
            c.LevelId   = quesObj.QuestionNextLevelId;
            db.ChatBot.Add(c);
            db.SaveChanges();
            return(Json(new { status = "true" }));
        }
Example #11
0
 public ActionResult AddHeader(string header)
 {
     try
     {
         chatbot c = new chatbot();
         c.Desc      = header;
         c.IsHeader  = 1;
         c.LevelId   = 0;
         c.ParentId  = 0;
         c.ContactId = 0;
         ChatBotContext addHeader = new ChatBotContext();
         addHeader.ChatBot.Add(c);
         addHeader.SaveChanges();
         return(Json(new { status = true }));
     }
     catch (Exception ex)
     {
         return(Json(new { status = false, data = "" }));
     }
 }
Example #12
0
        public ActionResult ShowAllQuestions()
        {
            ViewModel header = new ViewModel();

            using (ChatBotContext cb = new ChatBotContext())
            {
                if (cb.ContactInfromation.ToList().Count > 0)
                {
                    header.ContactList = (from c in cb.ContactInfromation
                                          select new ContectLists
                    {
                        Address = c.Address,
                        email = c.email,
                        Id = c.id,
                        name = c.name,
                        phoneNumber = c.phoneNumber,
                        website = c.website
                    }).ToList();
                }


                if (cb.ChatBot.ToList().Count > 0)
                {
                    header.QuestionList = (from c in cb.ChatBot
                                           select new QuestionList
                    {
                        ContactId = c.ContactId,
                        Desc = c.Desc,
                        IsHeader = c.IsHeader,
                        LevelId = c.LevelId,
                        ParentId = c.ParentId,
                        QID = c.QID
                    }).ToList();
                }


                return(View(header));
            }
        }
 public NoticesRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #14
0
 public RespostasController(ChatBotContext context)
 {
     _context = context;
 }
 public ChatItemsController(ChatBotContext context)
 {
     _context = context;
 }
Example #16
0
 public UserController(ChatBotContext context)
 {
     _context = context;
 }
Example #17
0
 public MailListsController(ChatBotContext context)
 {
     _context = context;
 }
Example #18
0
 public RoleRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #19
0
 public AuthController(IAuthRepository repo, IConfiguration config, ChatBotContext ctx)
 {
     _config    = config;
     _repo      = repo;
     _dbContext = ctx;
 }
 internal UsersRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #21
0
 public QuestionAnswerRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #22
0
 public AuthRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #23
0
 internal OperatorsRepository(ChatBotContext context)
 {
     _context = context;
 }
 public EtapasController(ChatBotContext context)
 {
     _context = context;
 }
 public TrelloCardController(ChatBotContext context)
 {
     _context = context;
 }
Example #26
0
 public Seed(ChatBotContext context, IConfiguration config)
 {
     _context = context;
     _config  = config;
 }
 public DefaultBotResponsesRepository(ChatBotContext dbContext, ILogger <DefaultBotResponsesRepository> logger)
 {
     _dbContext = dbContext;
     _logger    = logger;
 }
 internal RegistratedUsersRepository(ChatBotContext context)
 {
     _context = context;
 }
Example #29
0
 public UsersController(ChatBotContext context, IMapper mapper)
 {
     _mapper  = mapper;
     _context = context;
 }
Example #30
0
 public ValidationHelperRepository(ChatBotContext chatBotContext)
 {
     _chatBotContext = chatBotContext;
 }