Exemple #1
0
        public async Task MoreInfoForPrograms(IDialogContext context, LuisResult result)
        {
            List <string> intents  = new List <string>();
            List <string> entities = new List <string>();

            foreach (var e in result.Intents)
            {
                intents.Add(e.Intent);
            }
            foreach (var e in result.Entities)
            {
                entities.Add(e.Entity);
            }
            if (entities.Count > 0)
            {
                if (entities[0].Contains("mach"))
                {
                    await context.PostAsync("The Microsoft Academy for College Hires (MACH) is as an accelerated career development program designed to recruit and hire top-performing graduates across a broad range of roles, and aims to cultivate your talent utilizing training, mentoring, and community support.");
                }
                else if (entities[0].Contains("intern"))
                {
                    await context.PostAsync("At Microsoft, our interns work on projects that matter – and your team will rely on your skills and insights to help deliver those projects to market. You’ll get the opportunity to work on real projects and have fun along the way. This is your chance to show off your skills and work on cutting-edge technology. We offer internships in all job families and product areas. Imagine yourself as a Microsoft intern. Join Microsoft today, and help us shape the business of tomorrow.");
                }
                else if (entities[0].Contains("no"))
                {
                    await context.PostAsync("Don't worry, you can still apply for all the other roles at https://careers.microsoft.com/");
                }
            }
            else
            {
                var message = context.MakeMessage();
                message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
                var attachment = new List <Attachment>();
                var actions    = new List <CardAction>()
                {
                    AttachmentsHelper.CreateCardAction("MACH Opportunities", "more info for mach", ActionTypes.PostBack),
                    AttachmentsHelper.CreateCardAction("Internship Opportunities", "more info for intern", ActionTypes.PostBack),
                    AttachmentsHelper.CreateCardAction("Non-Student Opportunities", "i want to know more but no-student", ActionTypes.PostBack)
                };
                var card = AttachmentsHelper.CreateHeroCardAttachment("What do you want to know?", "Click on the buttons below to learn more about the opportunities", null, null, actions);
                attachment.Add(card);
                message.Attachments = attachment;
                await context.PostAsync(message);
            }
            context.Wait(this.MessageReceived);
        }
Exemple #2
0
        public async Task ApplyForJob(IDialogContext context, LuisResult result)
        {
            List <string> intents  = new List <string>();
            List <string> entities = new List <string>();

            foreach (var e in result.Intents)
            {
                intents.Add(e.Intent);
            }
            foreach (var e in result.Entities)
            {
                entities.Add(e.Entity);
            }
            if (entities.Count > 0)
            {
                if (entities[0].Contains("mach"))
                {
                    await context.PostAsync("Are you a fresh graduate? If yes, you can explore the Graduate Opportunities at https://careers.microsoft.com/ website, at the 'Students and Graduates' tab. if you are not a student, then you can explore the vacancies for experienced professionals in the same website. ");
                }
                else if (entities[0].Contains("intern"))
                {
                    await context.PostAsync("You can apply for internship if you are fresh graduate or final year student. You can explore the Graduate Opportunities at https://careers.microsoft.com/ website, at the 'Students and Graduates' tab.");
                }
                else if (entities[0].Contains("no"))
                {
                    await context.PostAsync("Don't worry, you can still apply for all the other roles at https://careers.microsoft.com/");
                }
            }
            else
            {
                var message = context.MakeMessage();
                message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
                var attachment = new List <Attachment>();
                var actions    = new List <CardAction>()
                {
                    AttachmentsHelper.CreateCardAction("MACH Positions", "apply for mach", ActionTypes.PostBack),
                    AttachmentsHelper.CreateCardAction("Internships Positions", "apply for intern", ActionTypes.PostBack),
                    AttachmentsHelper.CreateCardAction("Non-Student Positions", "apply but no-student", ActionTypes.PostBack)
                };
                var card = AttachmentsHelper.CreateHeroCardAttachment("For what position are you interested in?", "Click on the buttons below to learn more about the opportunities", null, null, actions);
                attachment.Add(card);
                message.Attachments = attachment;
                await context.PostAsync(message);
            }
            context.Wait(this.MessageReceived);
        }
Exemple #3
0
        public async Task Help(IDialogContext context, LuisResult result)
        {
            await context.PostAsync("Just type in your question or select one of the below options");

            var message = context.MakeMessage();

            message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
            var attachment = new List <Attachment>();
            var actions    = new List <CardAction>()
            {
                AttachmentsHelper.CreateCardAction("Learn about Microsoft", "What is Microsoft", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Learn about MACH", "More info for MACH", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Learn about Internships", "More info for Intern", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Apply for a Job", "Apply for Job", ActionTypes.PostBack)
            };
            var card = AttachmentsHelper.CreateHeroCardAttachment("What do you want to know?", "Click on the buttons below to get started or type your question below", null, null, actions);

            attachment.Add(card);
            message.Attachments = attachment;
            await context.PostAsync(message);

            context.Wait(this.MessageReceived);
        }
Exemple #4
0
        private async Task ConversationStarted(IDialogContext context, IAwaitable <string> argument)
        {
            var message = context.MakeMessage();
            await context.PostAsync("Hello there!");

            await context.PostAsync("I am a Bot and I am here to help you with your questions concerning Microsoft Internship and MACHs programs.");

            message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
            var attachment = new List <Attachment>();
            var actions    = new List <CardAction>()
            {
                AttachmentsHelper.CreateCardAction("Learn about Microsoft", "What is Microsoft", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Learn about MACH", "mach", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Learn about Internships", "internship", ActionTypes.PostBack),
                AttachmentsHelper.CreateCardAction("Apply for a Job", "Apply for Job", ActionTypes.PostBack)
            };
            var card = AttachmentsHelper.CreateHeroCardAttachment("What do you want to know?", "Click on the buttons below to get started or type your question below", null, null, actions);

            attachment.Add(card);
            message.Attachments = attachment;
            await context.PostAsync(message);

            context.Wait(InputGiven);
        }