private static void SecondTask()
        {
            var entityQuestions = new InterviewQuestions();

            entityQuestions.EntityFrameworkOne();
            entityQuestions.EntityFrameworkTwo();
            entityQuestions.EntityFrameworkThree();
        }
    private void OnPhraseRecognized(PhraseRecognizedEventArgs args)
    {
        Random             r  = new Random();
        InterviewQuestions qs = new InterviewQuestions();

        if (args.text == m_Keywords[3])
        {
            voice.Volume = 60;
            voice.Speak("Hello Welcome, would you like to start your interview?");
            intro = true;
        }

        if (args.text == m_Keywords[0] && intro)
        {
            stage = "non-coding";
            var behaviouralQ = qs.BehaviouralQuestions[r.Next(qs.BehaviouralQuestions.Count)];
            question.text = behaviouralQ;
            voice.Speak(behaviouralQ);
        }

        if (args.text == m_Keywords[2])
        {
            switch (stage)
            {
            case "behavioral":
                stage = "non-coding";
                var behaviouralQ = qs.BehaviouralQuestions[r.Next(qs.BehaviouralQuestions.Count)];
                question.text = behaviouralQ;
                Debug.Log("Reached Behavioral");
                voice.Speak(behaviouralQ);
                break;

            case "non-coding":
                stage = "coding";
                var technicalNonCodingQ = qs.TechnicalNonCodingQuestions[r.Next(qs.TechnicalNonCodingQuestions.Count)];
                question.text = technicalNonCodingQ;
                Debug.Log("Reached Non Coding");
                voice.Speak(technicalNonCodingQ);
                break;

            case "coding":
                stage = "";
                IsQ3  = true;
                var technicalCodingQ = qs.TechnicalCodingQuestions[r.Next(qs.TechnicalCodingQuestions.Count)];
                question.text = technicalCodingQ.Item2;
                Debug.Log("Reached Coding");
                GetMultipleChoicePhotos(technicalCodingQ.Item1);
                voice.Speak(technicalCodingQ.Item2);
                break;

            default:
                voice.Speak("You have completed the interview, Good Luck!");
                break;
            }
        }
    }
Beispiel #3
0
        public ActionResult InterviewQuestionIndex(InterviewQuestions iq)
        {
            using (SqlConnection con = new SqlConnection(cs))
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("GetAllInterviewQuestion", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.ExecuteNonQuery();

                DataTable      dt = new DataTable();
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(dt);

                ViewBag.QAData = dt;
                con.Close();
            }

            return(View());
        }
Beispiel #4
0
        public ActionResult CreateInterviewQuestion(int?Id)
        {
            if (Session["Email"] == null)
            {
                return(RedirectToAction("Login", "AdminLogin"));
            }

            InterviewQuestions iq = new InterviewQuestions();

            if (Id == null)
            {
                iq.PublishOn   = DateTime.Now.ToString("MMM dd yyyy hh:mm tt");
                ViewBag.IsEdit = false;
            }
            else
            {
                using (SqlConnection con = new SqlConnection(cs))
                {
                    con.Open();
                    SqlCommand cmd = new SqlCommand("GetInterviewQuestionById", con);
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@interviewQuestionId", Id);
                    cmd.ExecuteNonQuery();

                    DataTable      dt = new DataTable();
                    SqlDataAdapter da = new SqlDataAdapter(cmd);
                    da.Fill(dt);

                    foreach (DataRow dr in dt.Rows)
                    {
                        iq.InterviewQuestionId = Convert.ToInt32(dr["InterviewQuestionId"]);
                        iq.InterviewQuestion   = dr["InterviewQuestion"].ToString();
                        iq.InterviewQuestionLongDescription = dr["InterviewQuestionLongDescription"].ToString();
                        iq.PublishOn = dr["PublishOn"].ToString();
                    }

                    ViewBag.IsEdit = true;
                    ViewBag.Id     = Id;
                }
            }
            return(View(iq));
        }
Beispiel #5
0
        public static Task <string> PostIvQuestionsDetails(InterviewQuestions interrviewQues)
        {
            var responseStr = new TaskCompletionSource <string>();

            using (var client = new HttpClient())
            {
                try
                {
                    var stringContent = new StringContent(JsonConvert.SerializeObject(interrviewQues), Encoding.UTF8, "application/json");
                    //var result = client.PostAsync(Constant.LocalhostURL + "InterviewQuestions/DisplayQuestions/", stringContent).Result;
                    //var result = client.GetAsync(Constant.LocalhostURL + "InterviewQuestions/GetQuestionsList?desigId="+interrviewQues.desigId+ "&streamId="+interrviewQues.streamId).Result;
                    var result = client.GetAsync(Constant.LocalhostURL + "InterviewQuestions/GetAll").Result;
                    responseStr.TrySetResult(result.Content.ReadAsStringAsync().Result);
                }
                catch (Exception ex)
                {
                    responseStr.TrySetResult(ex.Message.ToString());
                }
                return(responseStr.Task);
            }
        }
Beispiel #6
0
        public static Task <string> GetIvQuestionsDetails(InterviewQuestions interrviewQues)
        {
            var responseStr = new TaskCompletionSource <string>();

            using (var client = new HttpClient())
            {
                try
                {
                    using (var multipartFormDataContent = new MultipartFormDataContent())
                    {
                        var result = client.GetAsync(Constant.LocalhostURL + "InterviewQuestions/GetQuestionsList?desigId=" + interrviewQues.desigId + "&streamId=" + interrviewQues.streamId).Result;
                        responseStr.SetResult(result.Content.ReadAsStringAsync().Result);
                    }
                }
                catch (Exception ex)
                {
                    responseStr.TrySetResult(ex.Message.ToString());
                }
                return(responseStr.Task);
            }
        }
Beispiel #7
0
        public ActionResult CreateInterviewQuestion(InterviewQuestions iq, bool IsEdit, int?Id)
        {
            if (IsEdit)
            {
                using (SqlConnection con = new SqlConnection(cs))
                {
                    try
                    {
                        con.Open();
                        iq.InterviewQuestionId = Convert.ToInt32(Id);
                        SqlCommand cmd = new SqlCommand("InsertUpdateInterviewQuestion", con);
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.AddWithValue("@interviewQuestionId", iq.InterviewQuestionId);
                        cmd.Parameters.AddWithValue("@interviewQuestion", iq.InterviewQuestion);
                        cmd.Parameters.AddWithValue("@interviewQuestionLongDescription", iq.InterviewQuestionLongDescription);
                        cmd.Parameters.AddWithValue("@createdOn", iq.CreatedOn);
                        cmd.Parameters.AddWithValue("@modifiedOn", iq.ModifiedOn);
                        cmd.Parameters.AddWithValue("@publishOn", iq.PublishOn);
                        cmd.ExecuteNonQuery();
                        con.Close();
                    }
                    catch (Exception ex)
                    {
                        ViewBag.Msg    = "Oops! something went wrong";
                        ViewBag.Status = "alert-danger";
                    }
                }
                ViewBag.IsEdit = true;
                ViewBag.Id     = iq.InterviewQuestionId;

                ViewBag.Msg    = "Interview Question and Answer Updated susseccful";
                ViewBag.Status = "alert-success";
            }
            else
            {
                using (SqlConnection con = new SqlConnection(cs))
                {
                    try
                    {
                        con.Open();
                        SqlCommand cmd = new SqlCommand("InsertUpdateInterviewQuestion", con);
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.AddWithValue("@interviewQuestionId", iq.InterviewQuestionId);
                        cmd.Parameters.AddWithValue("@interviewQuestion", iq.InterviewQuestion);
                        cmd.Parameters.AddWithValue("@interviewQuestionLongDescription", iq.InterviewQuestionLongDescription);
                        cmd.Parameters.AddWithValue("@createdOn", iq.CreatedOn);
                        cmd.Parameters.AddWithValue("@modifiedOn", iq.ModifiedOn);
                        cmd.Parameters.AddWithValue("@publishOn", iq.PublishOn);
                        cmd.ExecuteNonQuery();
                        con.Close();


                        ViewBag.Msg    = "Interview Question and Answer added susseccful";
                        ViewBag.Status = "alert-success";
                    }
                    catch (Exception ex)
                    {
                        ViewBag.Msg    = "Oops! something went wrong";
                        ViewBag.Status = "alert-danger";
                    }
                }

                ViewBag.IsEdit = false;
            }
            return(View());
        }
        public void IVQuestionsLayout(List <Department> deps, List <Designation> desig, List <Stream> streams)
        {
            if (ACTContext.isLogin == true)
            {
                //#region add education detail button
                //Button btnAddNewWorkExp = new Button { Text = "Add education detail", HorizontalOptions = LayoutOptions.EndAndExpand, BackgroundColor = Color.FromHex("4690FB"), TextColor = Color.White, BorderRadius = 10, HeightRequest = 35, FontSize = 10, FontAttributes = FontAttributes.Bold };
                //StackLayout sBtnAddNewWorkExp = new StackLayout
                //{
                //    Children = { btnAddNewWorkExp },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(2, 5, 2, 5)
                //};
                //#endregion

                #region university, college, pkrQualification, pkrDegree pickers
                Label lblEducationDetailsInfo = new Label {
                    Text = "View Interview Questions", HorizontalOptions = LayoutOptions.CenterAndExpand, TextColor = Color.FromHex("5e247f"), FontSize = 18, FontAttributes = FontAttributes.Bold, HeightRequest = 30
                };
                StackLayout sEducationDetailInfo = new StackLayout
                {
                    Children    = { lblEducationDetailsInfo },
                    Orientation = StackOrientation.Horizontal,
                    Padding     = new Thickness(0, 50, 0, 10)
                };
                Seperator sListViewHeader = new Seperator();
                //pkrUniversityName = new Picker { Title="University Name", HorizontalOptions = LayoutOptions.FillAndExpand, BackgroundColor = Color.Gray };
                //foreach (UniversityModel item in university)
                //{
                //    pkrUniversityName.Items.Add(item.pkrUniversityName);
                //}
                //StackLayout spkrUniversityName = new StackLayout
                //{
                //    Children = { pkrUniversityName },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};

                #region dept
                Label lblUniversityPickerTitle = new Label {
                    Text = "Interview Questions", TextColor = Color.Gray
                };
                pkrdeps = new Picker {
                    IsVisible = false
                };
                pkrdeps.Title = "Interview Questions";
                foreach (Department item in deps)
                {
                    pkrdeps.Items.Add(item.DepartmentName);
                }
                pkrdeps.SelectedIndexChanged += (s, e) =>
                {
                    lblUniversityPickerTitle.TextColor = Color.Black;
                    lblUniversityPickerTitle.Text      = pkrdeps.Items[pkrdeps.SelectedIndex].ToString();
                };
                Image imgpkrUniversityNameDropdown = new Image {
                    Source = "dropdownPicker.png", HorizontalOptions = LayoutOptions.EndAndExpand
                };

                StackLayout spkrUniversityName = new StackLayout {
                    Children = { lblUniversityPickerTitle, pkrdeps, imgpkrUniversityNameDropdown }, Orientation = StackOrientation.Horizontal, Padding = new Thickness(0, 5, 0, 5)
                };
                Frame frmpkrUniversityName = new Frame {
                    Content = spkrUniversityName, BackgroundColor = Color.White, Padding = new Thickness(Device.OnPlatform(8, 5, 0)), HasShadow = false
                };

                recognizerdeps.NumberOfTapsRequired = 1; // single-tap
                recognizerdeps.Tapped += (s, e) =>
                {
                    pkrdeps.Focus();
                };
                frmpkrUniversityName.GestureRecognizers.Add(recognizerdeps);
                Seperator universityNameSeparator = new Seperator();
                #endregion

                #region college name
                Label lblCollegePickerTitle = new Label {
                    Text = "Designation", TextColor = Color.Gray
                };
                pkrdesig = new Picker {
                    IsVisible = false
                };
                pkrdesig.Title = "Designation Name";
                foreach (Designation item in desig)
                {
                    pkrdesig.Items.Add(item.DesignationName);
                }
                pkrdesig.SelectedIndexChanged += (s, e) =>
                {
                    lblCollegePickerTitle.TextColor = Color.Black;
                    lblCollegePickerTitle.Text      = pkrdesig.Items[pkrdesig.SelectedIndex].ToString();
                };
                Image imgCollegeNameDropdown = new Image {
                    Source = "dropdownPicker.png", HorizontalOptions = LayoutOptions.EndAndExpand
                };

                StackLayout sCollegeName = new StackLayout {
                    Children = { lblCollegePickerTitle, pkrdesig, imgCollegeNameDropdown }, Orientation = StackOrientation.Horizontal, Padding = new Thickness(0, 5, 0, 5)
                };
                Frame frmCollegeName = new Frame {
                    Content = sCollegeName, BackgroundColor = Color.White, Padding = new Thickness(Device.OnPlatform(8, 5, 0)), HasShadow = false
                };

                recognizerdesig.NumberOfTapsRequired = 1; // single-tap
                recognizerdesig.Tapped += (s, e) =>
                {
                    pkrdesig.Focus();
                };
                frmCollegeName.GestureRecognizers.Add(recognizerdesig);
                Seperator collegeNameSeparator = new Seperator();
                #endregion

                #region stream
                Label lblQualificationPickerTitle = new Label {
                    Text = "Stream", TextColor = Color.Gray, FontSize = Device.OnPlatform(11, 14, 14)
                };
                pkrstream = new Picker {
                    IsVisible = false
                };
                pkrstream.Title = "Stream";
                foreach (Stream item in streams)
                {
                    pkrstream.Items.Add(item.StreamName);
                }
                pkrstream.SelectedIndexChanged += (s, e) =>
                {
                    lblQualificationPickerTitle.TextColor = Color.Black;
                    lblQualificationPickerTitle.Text      = pkrstream.Items[pkrstream.SelectedIndex].ToString();
                };
                Image imgQualificationDropdown = new Image {
                    Source = "dropdownPicker.png", HorizontalOptions = LayoutOptions.EndAndExpand
                };

                StackLayout sQualificationName = new StackLayout {
                    Children = { lblQualificationPickerTitle, pkrstream, imgQualificationDropdown }, Orientation = StackOrientation.Horizontal, Padding = new Thickness(0, 5, 0, 5)
                };
                Frame frmQualification = new Frame {
                    Content = sQualificationName, BackgroundColor = Color.White, Padding = new Thickness(Device.OnPlatform(8, 5, 0)), HasShadow = false
                };

                recognizerstream.NumberOfTapsRequired = 1; // single-tap
                recognizerstream.Tapped += (s, e) =>
                {
                    pkrstream.Focus();
                };
                frmQualification.GestureRecognizers.Add(recognizerstream);
                Seperator qualificationSeparator = new Seperator();
                #endregion

                //#region degree
                //Label lblDegreePickerTitle = new Label { Text = "Degree", TextColor = Color.Gray };
                //pkrDegree = new Picker { IsVisible = false };
                //pkrDegree.Title = "Degree";
                //foreach (Degree item in degrees)
                //{
                //    pkrDegree.Items.Add(item.DegreeName);
                //}
                //pkrDegree.SelectedIndexChanged += (s, e) =>
                //{
                //    lblDegreePickerTitle.TextColor = Color.Black;
                //    lblDegreePickerTitle.Text = pkrDegree.Items[pkrDegree.SelectedIndex].ToString();
                //};
                //Image imgDegreeDropdown = new Image { Source = "dropdownPicker.png", HorizontalOptions = LayoutOptions.EndAndExpand };

                //StackLayout sDegreeName = new StackLayout { Children = { lblDegreePickerTitle, pkrDegree, imgDegreeDropdown }, Orientation = StackOrientation.Horizontal, Padding = new Thickness(0, 5, 0, 5) };
                //Frame frmDegree = new Frame { Content = sDegreeName, BackgroundColor = Color.White, Padding = new Thickness(Device.OnPlatform(8, 5, 0)), HasShadow = false };

                //recognizerDegree.NumberOfTapsRequired = 1; // single-tap
                //recognizerDegree.Tapped += (s, e) =>
                //{
                //    pkrDegree.Focus();
                //};
                //frmDegree.GestureRecognizers.Add(recognizerDegree);
                //Seperator degreeSeparator = new Seperator();
                //#endregion

                //#endregion

                //#region branch
                //txtBranch = new CustomEntryForGeneralPurpose { Placeholder = "Branch", HorizontalOptions = LayoutOptions.FillAndExpand };
                //StackLayout sBranch = new StackLayout
                //{
                //    Children = { txtBranch },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};
                //Seperator seperatorBranch = new Seperator();
                //#endregion

                //#region duration
                //Label lblDuration = new Label { Text = "Duration", HorizontalOptions = LayoutOptions.Start, TextColor = Color.Gray, WidthRequest = 80, HeightRequest = 30 };
                //StackLayout slblDuration = new StackLayout
                //{
                //    Children = { lblDuration },
                //    Orientation = StackOrientation.Horizontal,
                //    HorizontalOptions = LayoutOptions.End,
                //    Margin = new Thickness(3, 8, 0, 0)
                //};

                //lblFromDateText = new Label { Text = "From", HorizontalOptions = LayoutOptions.Center, TextColor = Color.Gray };

                //StackLayout sLblFromDateText = new StackLayout
                //{
                //    Children = { lblFromDateText },
                //    Orientation = StackOrientation.Horizontal,
                //    Margin = new Thickness(0, 8, 0, 0)
                //};

                //Image imgFromDateArrow = new Image { Source = "calendar.png", HorizontalOptions = LayoutOptions.End };

                //StackLayout slFromDateTap = new StackLayout { Children = { sLblFromDateText, imgFromDateArrow }, Orientation = StackOrientation.Horizontal };

                //DatePicker dtFromDate = new DatePicker { IsVisible = false, BackgroundColor = Color.White };
                //var fromDateTapGestureRecognizer = new TapGestureRecognizer();

                //fromDateTapGestureRecognizer.NumberOfTapsRequired = 1; // single-tap
                //fromDateTapGestureRecognizer.Tapped += (s, e) =>
                //{
                //    dtFromDate.Focus();
                //};

                //slFromDateTap.GestureRecognizers.Add(fromDateTapGestureRecognizer);

                //dtFromDate.DateSelected += (object sender, DateChangedEventArgs e) =>
                //{
                //    //lblFromDateText.Text = e.NewDate.ToString("dd-MM-yyyy");
                //    lblFromDateText.Text = e.NewDate.ToString("yyyy-MM-dd");
                //};

                ////To date
                //lblToDateText = new Label { Text = "To", HorizontalOptions = LayoutOptions.Center, TextColor = Color.Gray };

                //StackLayout sLblToDateText = new StackLayout
                //{
                //    Children = { lblToDateText },
                //    Orientation = StackOrientation.Horizontal,
                //    Margin = new Thickness(0, 8, 0, 0)
                //};

                //Image imgToDateArrow = new Image { Source = "calendar.png", HorizontalOptions = LayoutOptions.End };

                //StackLayout slToDateTap = new StackLayout { Children = { sLblToDateText, imgToDateArrow }, Orientation = StackOrientation.Horizontal };

                //DatePicker dtToDate = new DatePicker { IsVisible = false, BackgroundColor = Color.White };
                //var toDateTapGestureRecognizer = new TapGestureRecognizer();

                //toDateTapGestureRecognizer.NumberOfTapsRequired = 1; // single-tap
                //toDateTapGestureRecognizer.Tapped += (s, e) =>
                //{
                //    dtToDate.Focus();
                //};

                //slToDateTap.GestureRecognizers.Add(toDateTapGestureRecognizer);

                //dtToDate.DateSelected += (object sender, DateChangedEventArgs e) =>
                //{
                //    //lblToDateText.Text = e.NewDate.ToString("dd-MM-yyyy");
                //    lblToDateText.Text = e.NewDate.ToString("yyyy-MM-dd");
                //};

                //Label lblFromToTo = new Label { Text = "-", HorizontalOptions = LayoutOptions.Center, TextColor = Color.Gray };

                //StackLayout sLblFromToTo = new StackLayout
                //{
                //    Children = { lblFromToTo },
                //    Orientation = StackOrientation.Horizontal,
                //    Margin = new Thickness(0, 8, 0, 0)
                //};

                //StackLayout sWorkDuration = new StackLayout
                //{
                //    Children = { slblDuration, slFromDateTap, dtFromDate, sLblFromToTo, slToDateTap, dtToDate },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};
                //Seperator sDuration = new Seperator();
                //#endregion

                //#region percentage, project info, aftersave response, button
                //txtPercentage = new CustomEntryForGeneralPurpose { Placeholder = "Percentage", HorizontalOptions = LayoutOptions.FillAndExpand, Keyboard = Keyboard.Numeric };
                //txtPercentage.Behaviors.Add(new DecimalNumberValidationBehaviour());
                //StackLayout sPercentage = new StackLayout
                //{
                //    Children = { txtPercentage },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};
                //Seperator sPercentageText = new Seperator();
                //txtProjectInformation = new CustomEntryForGeneralPurpose { Placeholder = "Project Information", HorizontalOptions = LayoutOptions.FillAndExpand };
                //StackLayout sProjectInformation = new StackLayout
                //{
                //    Children = { txtProjectInformation },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};
                //Seperator sProjectInfo = new Seperator();
                //Label AfterSaveResponse = new Label { Text = "", HorizontalOptions = LayoutOptions.CenterAndExpand, TextColor = Color.Green };
                //StackLayout slAfterSaveResponse = new StackLayout
                //{
                //    Children = { AfterSaveResponse },
                //    Orientation = StackOrientation.Horizontal,
                //    Margin = new Thickness(0, 8, 0, 0)
                //};

                Button btnSaveData = new Button {
                    Text = "View Questions", HorizontalOptions = LayoutOptions.CenterAndExpand, BackgroundColor = Color.FromHex("f7cc59"), TextColor = Color.Black, BorderRadius = 50, WidthRequest = 270, FontAttributes = FontAttributes.Bold
                };
                StackLayout sbtnSaveData = new StackLayout
                {
                    Children    = { btnSaveData },
                    Orientation = StackOrientation.Horizontal,
                    Padding     = new Thickness(0, 10, 0, 8)
                };
                //#endregion

                //#region listView

                //Label lblAddNewEducationDetail = new Label { Text = "Add new education detail information here", HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f"), FontSize = 14, FontAttributes = FontAttributes.Bold };
                //StackLayout slblAddNewEducationDetail = new StackLayout
                //{
                //    Children = { lblAddNewEducationDetail },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 20, 0, 0)
                //};

                //StackLayout slHeaderText = new StackLayout();
                //Label lblColege = new Label { Text = "College", FontAttributes = FontAttributes.Bold, WidthRequest = 130, HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f") };
                //Label lblpkrDegree = new Label { Text = "Degree", FontAttributes = FontAttributes.Bold, WidthRequest = 130, HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f") };
                //Label lblPercentage = new Label { Text = "Percentage", FontAttributes = FontAttributes.Bold, WidthRequest = 130, HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f") };
                //Label lblEmpty = new Label { Text = "", HorizontalOptions = LayoutOptions.Start, TextColor = Color.Black };
                //slHeaderText = new StackLayout
                //{
                //    Children = { lblColege, lblpkrDegree, lblPercentage, lblEmpty },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};
                //if(educationList.Count == 0)
                //{
                //    slHeaderText.IsVisible = false;
                //    sListViewHeader.IsVisible = false;
                //}


                //educationObservableCollection = educationList;

                //listView.ItemsSource = educationObservableCollection;
                //listView.ItemTemplate = new DataTemplate(() => new EducationCell(educationObservableCollection, college, qualifications));
                //listView.HeightRequest = 50 * educationList.Count;
                //StackLayout sListView = new StackLayout
                //{
                //    Children = { listView },
                //    Orientation = StackOrientation.Horizontal,
                //    Padding = new Thickness(0, 0, 0, 0)
                //};

                //#endregion

                //#region stack layout, scroll view and content

                slEducationAllInformationAdd = new StackLayout
                {
                    Children =   //slblAddNewEducationDetail,
                    {
                        frmpkrUniversityName, universityNameSeparator, frmCollegeName, collegeNameSeparator,
                        frmQualification,     qualificationSeparator,
                        //frmDegree, degreeSeparator, sBranch, seperatorBranch,
                        //sWorkDuration, sDuration, sPercentage, sPercentageText,
                        //sProjectInformation, sProjectInfo, slAfterSaveResponse,
                        sbtnSaveData
                    }
                };
                slEducationAllInformationAdd.IsVisible = true;
                //btnAddNewWorkExp.Clicked += (object sender, EventArgs e) =>
                //{
                //    slEducationAllInformationAdd.IsVisible = true;
                //};
                #endregion

                #region posting data
                InterviewQuestions interrviewQues = new InterviewQuestions();


                StackLayout slHeaderText = new StackLayout();
                StackLayout slEducationDetailsInformation = new StackLayout();
                StackLayout sListView = new StackLayout();

                btnSaveData.Clicked += (object sender, EventArgs e) =>
                {
                    sListView.IsVisible = true;
                    if (Validate())
                    {
                        //interrviewQues.deptId = ACTContext.userId;
                        interrviewQues.deptId   = (from c in deps where c.DepartmentName == pkrdeps.Items[pkrdeps.SelectedIndex] select c.DepartmentId).SingleOrDefault();
                        interrviewQues.desigId  = (from d in desig where d.DesignationName == pkrdesig.Items[pkrdesig.SelectedIndex] select d.DesignationId).SingleOrDefault();
                        interrviewQues.streamId = (from c in streams where c.StreamName == pkrstream.Items[pkrstream.SelectedIndex] select c.StreamID).SingleOrDefault();

                        //slHeaderText.IsVisible = true;
                        sListViewHeader.IsVisible = true;

                        Device.BeginInvokeOnMainThread(async() =>
                        {
                            var resInS = await Service.GetIvQuestionsDetails(interrviewQues);
                            if (resInS != null)
                            {
                                intss = (List <InterviewSet>)JsonConvert.DeserializeObject <List <InterviewSet> >(resInS);
                            }
                            List <InterviewSet> interviewSetObservableCollection = new List <InterviewSet>();
                            interviewSetObservableCollection = intss;

                            Label lblQ = new Label {
                                Text = "Question", FontAttributes = FontAttributes.Bold, WidthRequest = 130, HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f")
                            };
                            Label lblA = new Label {
                                Text = "Answer", FontAttributes = FontAttributes.Bold, WidthRequest = 130, HorizontalOptions = LayoutOptions.Start, TextColor = Color.FromHex("5e247f")
                            };
                            slHeaderText = new StackLayout
                            {
                                Children    = { lblQ, lblA },
                                Orientation = StackOrientation.Horizontal,
                                Padding     = new Thickness(0, 0, 0, 0)
                            };
                            if (intss.Count == 0)
                            {
                                slHeaderText.IsVisible    = false;
                                sListViewHeader.IsVisible = false;
                            }
                            listView.ItemsSource = intss;
                            //listView.ItemTemplate = new DataTemplate(() => new InterviewQuestionsCell(intss));
                            listView.ItemTemplate  = new DataTemplate(() => new InterviewQuestionsCell(interviewSetObservableCollection));
                            listView.HeightRequest = 50 * intss.Count;
                        });
                    }
                    ;
                };

                //StackLayout slHeaderText = new StackLayout();


                #endregion

                #region listview
                sListView = new StackLayout
                {
                    Children    = { listView },
                    Orientation = StackOrientation.Horizontal,
                    Padding     = new Thickness(0, 0, 0, 0)
                };
                sListView.IsVisible = false;
                #endregion

                slEducationDetailsInformation = new StackLayout
                {
                    Children          = { /*sBtnAddNewWorkExp,*/ sEducationDetailInfo, slHeaderText, sListViewHeader, sListView, slEducationAllInformationAdd },
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    VerticalOptions   = LayoutOptions.FillAndExpand,
                    Padding           = new Thickness(20, 0, 20, 30),
                    BackgroundColor   = Color.White
                };

                ScrollView svEducationDetails = new ScrollView {
                    Content = slEducationDetailsInformation
                };

                Content = svEducationDetails;
            }
            else
            {
                Navigation.PushModalAsync(new Login());
            }
        }