public void BindStudentList()
        {
            ApplicationResult objResult    = new ApplicationResult();
            StudentBL         objStudentBl = new StudentBL();

            objResult = objStudentBl.StudentDetail_ForCategoryWiseReport(Convert.ToInt32(Session[ApplicationSession.TRUSTID]), Convert.ToInt32(Convert.ToInt32(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]))), ddlYear.SelectedItem.ToString(), Convert.ToInt32(ddlStatus.SelectedValue));
            if (objResult.resultDT.Rows.Count > 0)
            {
                gvReport.DataSource = objResult.resultDT;
                gvReport.DataBind();
                gvReport1.DataSource = objResult.resultDT;
                gvReport1.DataBind();

                divReport.Visible = true;
                //btnPrintDetail.Visible = true;
                pnlStudentInfo.Visible = false;
                lblSchool.Text         = "નવચેતન અંગ્રેજી અને ગુજરાતી માધ્યમિક શાળા, ખરચ";
                lblSchool1.Text        = "નવચેતન અંગ્રેજી અને ગુજરાતી માધ્યમિક શાળા, ખરચ";
                lblSection.Text        = ddlSection.SelectedItem.ToString();
                lblYear.Text           = ddlYear.SelectedItem.ToString();
                lblStatus.Text         = ddlStatus.SelectedItem.ToString();
                lblSection1.Text       = ddlSection.SelectedItem.ToString();
                lblYear1.Text          = ddlYear.SelectedItem.ToString();
                lblStatus1.Text        = ddlStatus.SelectedItem.ToString();
            }
            else
            {
                divReport.Visible = false;
                // btnPrintDetail.Visible = false;
                pnlStudentInfo.Visible = true;
                ClearAll();
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('No Records Found.');", true);
            }
        }
Exemple #2
0
        public void BindStudentList()
        {
            ApplicationResult objResult    = new ApplicationResult();
            StudentBL         objStudentBl = new StudentBL();

            objResult = objStudentBl.FeesCollction_ClassWiseStudentFees(Convert.ToInt32(Session[ApplicationSession.TRUSTID]), Convert.ToInt32(Session[ApplicationSession.SCHOOLID]), Convert.ToInt32(ddlclass.SelectedValue), Convert.ToInt32(ddlDivision.SelectedValue), ddlYear.SelectedItem.ToString(), txtFromDate.Text.Trim(), txtToDate.Text.Trim());
            if (objResult.resultDT.Rows.Count > 0)
            {
                gvReport.DataSource = objResult.resultDT;
                gvReport.DataBind();

                divReport.Visible             = true;
                pnlFeesCollectionInfo.Visible = false;
                lblTrust.Text  = Session[ApplicationSession.TRUSTNAME].ToString();
                lblSchool.Text = Session[ApplicationSession.SCHOOLNAME].ToString();
                lblClass.Text  = ddlclass.SelectedItem.ToString() + "-" + ddlDivision.SelectedItem.ToString();
                lblYear.Text   = ddlYear.SelectedItem.ToString();
            }
            else
            {
                divReport.Visible             = false;
                pnlFeesCollectionInfo.Visible = true;
                ClearAll();
                ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('No Records Found.');", true);
            }
        }
        private void getStudent()
        {
            StudentBL studentBL = new StudentBL();

            s = studentBL.GetStudent(lstMatchingStudents.SelectedValue.ToString());
            string msg = "";

            //Check Studend Status and overdueBalance
            foreach (ValidationError error in studentBL.Errors)
            {
                msg += error.Description + Environment.NewLine;
            }
            if (msg != string.Empty)
            {
                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            txtStudentId.Enabled           = false;
            txtBalanceDue.Enabled          = false;
            txtTelephone.Text              = s.Telephon;
            txtCity.Text                   = s.City;
            txtPostalCode.Text             = s.PostalCode;
            txtAddress.Text                = s.Address;
            txtStudentId.Text              = s.StudentId;
            txtFirstName.Text              = s.FirstName;
            txtLastName.Text               = s.lastName;
            cmbProgramOption.SelectedIndex = Convert.ToInt32(s.Program);
            dtpEndDate.Value               = s.EndDate;
            dtpStartDate.Value             = s.StartDate;
            txtBalanceDue.Text             = s.BalanceDue.ToString("c");
            chkIsActive.Checked            = s.IsActive;
        }
Exemple #4
0
        public async Task <ActionResult> Index(LoginModel loginModel)
        {
            if (ModelState.IsValid)
            {
                LoginBL loginBL = new LoginBL();
                loginModel.grant_type = "UserPassword";

                string request = JsonConvert.SerializeObject(loginModel);
                string token   = await loginBL.Login(request);

                MyAccessToken myToken = JsonConvert.DeserializeObject <MyAccessToken>(token);
                Session["token"]    = myToken.access_token;
                Session["loggedIn"] = "true";
                Session["UserName"] = loginModel.UserName;
                StudentBL studentBL = new StudentBL();
                string    Users     = await studentBL.GetStudents();

                List <User_Details> user = JsonConvert.DeserializeObject <List <User_Details> >(Users);
                foreach (User_Details u in user)
                {
                    if (u.UserName == loginModel.UserName && u.Category == "Admin")
                    {
                        return(RedirectToAction("Index", "AdminHome"));
                    }
                    else if (u.UserName == loginModel.UserName && u.Category == "Student")
                    {
                        return(RedirectToAction("Index", "Home"));
                    }
                }
                return(RedirectToAction("Error", "Login"));
            }
            return(View("Index"));
        }
Exemple #5
0
        public IActionResult ReprimandedStudents()
        {
            StudentBL studentBL           = new StudentBL(_unitOfWork, _mapper);
            var       reprimandedStudents = studentBL.GetReprimandedStudents();

            return(View(reprimandedStudents));
        }
        private void PopulateStudent(string studentid)
        {
            StudentBL studentBL = new StudentBL();

            s = studentBL.GetStudent(studentid);
            string msg = "";

            //Check Studend Status and overdueBalance
            foreach (ValidationError error in studentBL.Errors)
            {
                msg += error.Description + Environment.NewLine;
            }
            if (msg != string.Empty)
            {
                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            txtStudentId.Text     = s.StudentId;
            txtProgramOption.Text = s.Program.ToString();
            txtFirstName.Text     = s.FirstName;
            txtLastName.Text      = s.lastName;
            txtEndDate.Text       = s.EndDate.ToString();
            txtStartDate.Text     = s.StartDate.ToString();
            txtBalanceDue.Text    = s.BalanceDue.ToString("c");
            chkIsActive.Checked   = s.IsActive;
        }
Exemple #7
0
        private void GetResource(int resourceId)
        {
            ResourceBL resourceBL = new ResourceBL();

            r = resourceBL.GetResource(resourceId);
            if (r != null)
            {
                txtResourceTitle.Text  = r.Title;
                txtResourceType.Text   = r.ResourceType.ToString();
                txtResourceStatus.Text = r.ResourceStatus.ToString();
                chkIsReserved.Checked  = r.IsReserved;

                if (chkIsReserved.Checked == true)
                {
                    StudentBL studentBL = new StudentBL();
                    Student   s         = studentBL.GetStudent(r.StudentId);
                    txtReservedStudend.Text = s.FirstName + " " + s.lastName;
                }
                else
                {
                    txtReservedStudend.Text = "";
                }
            }
            else
            {
                string msg = "";
                foreach (ValidationError error in resourceBL.Errors)
                {
                    msg += error.Description + Environment.NewLine;
                }
                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #8
0
        public IActionResult EmailLogForUnPaids()
        {
            StudentBL studentBL           = new StudentBL(_unitOfWork, _mapper);
            var       forTutionViewModels = studentBL.GetEmailLogsForUnPaids();

            return(View(forTutionViewModels));
        }
Exemple #9
0
 public Form1()
 {
     try
     {
         Alumno al = new Alumno
         {
             Dni        = "234234234",
             Nombre     = "Daniel",
             Apellidos  = "Madirfal",
             Edad       = 28,
             Guid       = Guid.NewGuid(),
             Nacieminto = DateTime.Parse("14/11/1990"),
             Registro   = DateTime.Now,
         };
         StudentJson <Alumno> stu = new StudentJson <Alumno>();
         IStudentBL           bl  = new StudentBL(stu);
         bl.Add(al);
     }
     catch (Exception ex)
     {
         Log.Error(ex);
         throw;
     }
     InitializeComponent();
 }
Exemple #10
0
        //Deleting a Record
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                Int32 iStudentId = Convert.ToInt32(dataGridView1.CurrentRow.Cells["StudentId"].Value);

                DialogResult result1 = MessageBox.Show("Are you sure you want to delete this Student Record?",
                                                       "Delete the Record",
                                                       MessageBoxButtons.YesNo);

                if (result1 == DialogResult.Yes)
                {
                    int result = StudentBL.RemoveStudent(iStudentId);

                    if (result > 0)
                    {
                        //Record deleted successfully
                        //showing the new refreshed data
                        showData();
                    }
                }
            }//try
            catch
            {
                //MessageBox.Show(ex.Message);
                MessageBox.Show("Cannot Delete Record");
            }
        }
Exemple #11
0
        private void showData()
        {
            DataTable dtable = StudentBL.GetStudentDetails();

            dataGridView1.DataSource = dtable;

            #region Displaying rows in different colors
            Int32 rowcount = dataGridView1.RowCount;

            for (Int32 i = 0; i < rowcount - 1; i++)
            {
                //Getting the stream value of each row
                string stream = dataGridView1.Rows[i].Cells["Stream"].Value.ToString();
                stream = stream.Trim();

                //Changing the color of the row depending on the value of Stream
                if (stream.Equals("Science"))
                {
                    dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.LightSkyBlue;
                }
                else if (stream.Equals("Commerce"))
                {
                    dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.GreenYellow;
                }
                else if (stream.Equals("Humanities"))
                {
                    dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.OrangeRed;
                }
            }//for end
            #endregion
        }
        private void lstSearchResult_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                string studentId = lstSearchResult.SelectedValue.ToString();


                StudentBL stuBl = new StudentBL();
                stu = stuBl.GetStudentForm6(studentId);

                txtFirstName.Text = stu.FirstName;
                txtLastName.Text  = stu.LastName;
                if (stu.StudentStatus.ToString() == "Active")
                {
                    chkStatus.Checked = true;
                }
                else
                {
                    chkStatus.Checked = false;
                }

                dtpStart.Value          = stu.StartDate;
                dtpEnd.Value            = stu.EndDate;
                txtAmmountDue.Text      = stu.AmountDue.ToString();
                comboBox1.SelectedValue = stu.ProgramId;
                txtPostalCode.Text      = stu.PostalCode;
                txtAddress.Text         = stu.Address;
                txtCity.Text            = stu.City;
                txtPhoneNumber.Text     = stu.PhoneNumber;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #13
0
        private void BtnConfirm_Click(object sender, EventArgs e)
        {
            try
            {
                lblMsg2.Text = string.Empty;
                if (Convert.ToDecimal(dgvStudentInfo.Rows[0].Cells["BalanceDue"].Value) <= 0)
                {
                    lblMsg2.Text = "This student has not any balance due";
                    //MessageBox.Show("This student has not any balance due");
                }
                else if (txtPayment.Text == string.Empty)
                {
                    lblMsg2.Text = "Enter a valid amount";
                }
                else if (Convert.ToDecimal(txtPayment.Text) > Convert.ToDecimal(dgvStudentInfo.Rows[0].Cells["BalanceDue"].Value))
                {
                    lblMsg2.Text = "The payment cannot be greater than the student's current balancedue";
                    //MessageBox.Show("The payment cannot be greater than the student's current balancedue");
                }
                else if (txtPayment.Text == string.Empty)
                {
                    lblMsg2.Text = "Please enter the amount to pay";
                    //MessageBox.Show("Please enter the amount to pay");
                }
                else
                {
                    StudentBL studentBL = new StudentBL();
                    PaymentBL paymentBL = new PaymentBL();

                    string type = string.Empty;
                    if (rdoCredit.Checked == true)
                    {
                        type = "Credit";
                    }
                    else
                    {
                        type = "Debit";
                    }

                    if (studentBL.MakePayment(dgvStudents.CurrentRow.Cells["ID"].Value.ToString(), Convert.ToDecimal(txtPayment.Text)) &&
                        paymentBL.AddPayment(Convert.ToInt32(dgvStudents.CurrentRow.Cells["ID"].Value), Convert.ToDecimal(txtPayment.Text), type))
                    {
                        MessageBox.Show("Payment was successful");
                        txtSearch.Clear();
                        txtPayment.Clear();
                        rdoDebit.Checked = true;
                        dgvStudents.DataSource = null;
                        dgvStudentInfo.DataSource = null;
                    }
                    else
                    {
                        MessageBox.Show("Payment failed");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString());
            }
        }
        private void dgvStudents_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int selectedRow = e.RowIndex;

            if (selectedRow != -1)
            {
                string studentID = dgvStudents.Rows[selectedRow].Cells["ID"].Value.ToString();

                _studentID = studentID;



                StudentBL studentBL = new StudentBL();

                student = studentBL.GetStudent(id: studentID);

                grpStudentInformation.Enabled = true;

                PopulateStudentFields(student);
            }
            else
            {
                MessageBox.Show("Please select  a valid row.", "Invalid Row Selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #15
0
 protected void BindStudentGrid()
 {
     try
     {
         ApplicationResult objResult    = new ApplicationResult();
         StudentBL         objStudentBL = new StudentBL();
         ViewState["ClassMID"]     = Convert.ToInt32(Request.Form[ddlClass.UniqueID]);
         ViewState["DivisionName"] = Convert.ToInt32(Request.Form[ddlDivision.UniqueID]);
         ViewState["AcademicYear"] = ddlAcademicYear.SelectedItem.ToString();
         objResult = objStudentBL.Student_SelectFor_Upgrade(Convert.ToInt32(Session[ApplicationSession.SCHOOLID]), Convert.ToInt32(ViewState["ClassMID"].ToString()), Convert.ToInt32(ViewState["DivisionName"].ToString()), ddlAcademicYear.SelectedItem.ToString(), 1);
         if (objResult != null)
         {
             if (objResult.resultDT.Rows.Count > 0)
             {
                 gvStudent.Visible    = true;
                 gvStudent.DataSource = objResult.resultDT;
                 gvStudent.DataBind();
             }
             else
             {
                 gvStudent.Visible = false;
                 ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('No record Found');</script>");
             }
         }
     }
     catch (Exception ex)
     {
         logger.Error("Error", ex);
         ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
     }
 }
Exemple #16
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Student s = new Student();

            foreach (DataRow item in dt.Rows)
            {
                switch (item.RowState)
                {
                case DataRowState.Added:
                    s.Name         = item["Name"].ToString();
                    s.Surname      = item["Surname"].ToString();
                    s.NationId     = item["NationId"].ToString();
                    s.SchoolNumber = item["Schoolnumber"].ToString();
                    StudentBL.InsertStudent(s);
                    break;

                case DataRowState.Deleted:
                    s.StudentId = Convert.ToInt32(item["StudentId", DataRowVersion.Original]);
                    StudentBL.DeleteStudent(s.StudentId);
                    break;

                case DataRowState.Modified:
                    s.Name         = item["Name"].ToString();
                    s.Surname      = item["Surname"].ToString();
                    s.NationId     = item["NationId"].ToString();
                    s.SchoolNumber = item["Schoolnumber"].ToString();
                    s.StudentId    = Convert.ToInt32(item["StudentId"]);
                    StudentBL.UpdateStudent(s);
                    break;

                default:
                    break;
                }
            }
        }
    /// <summary>
    /// Handles the logic when the Enter button is pressed
    /// </summary>
    private void _on_EnterBtn_pressed()
    {
        StudentBL studentBL = new StudentBL();

        studentBL.UpdateStudentCharacter(charId, Global.StudentId);
        GetTree().ChangeScene("res://Presentation/MainMenu/MainMenu.tscn");
    }
        protected void btnGo_Click(object sender, EventArgs e)
        {
            gvPastFees.Visible = false;
            try
            {
                StudentBL objStudentBL = new StudentBL();
                StudentBO objStudentBO = new StudentBO();

                ApplicationResult objResultProgram = new ApplicationResult();
                objResultProgram = objStudentBL.Student_Search_StudentName(txtSearchName.Text, Convert.ToInt32(ddlSearchBy.SelectedValue), Convert.ToInt32(Session[ApplicationSession.ROLEID].ToString()), Convert.ToInt32(Session[ApplicationSession.SCHOOLID].ToString()));
                if (objResultProgram != null)
                {
                    if (objResultProgram.resultDT.Rows.Count > 0)
                    {
                        gvStudent.Visible    = true;
                        gvStudent.DataSource = objResultProgram.resultDT;
                        gvStudent.DataBind();
                        divFeePanel.Visible = false;
                    }
                    else
                    {
                        ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script language='javascript'>alert('No Record Found.');</script>");
                        gvStudent.Visible   = false;
                        divFeePanel.Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error", ex);
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
            }
        }
Exemple #19
0
        private void dgvStudents_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                label11.Text = string.Empty;
                int selectedRow = e.RowIndex;
                if (selectedRow != -1)
                {
                    string studentID = dgvStudents.Rows[selectedRow].Cells["ID"].Value.ToString();



                    StudentBL studentBL = new StudentBL();

                    Student retrievedStudent = studentBL.GetStudent(id: studentID);

                    if (studentBL.Errors.Count == 0)
                    {
                        grpStudentInformations.Enabled = true;
                        grpRessourceToBorrow.Enabled   = true;
                        //label11.Text = string.Empty;


                        PopulateStudentFields(retrievedStudent);

                        StudentLoanInfoBL loanInfoBL = new StudentLoanInfoBL();

                        PopulateStudentLoans(studentID, loanInfoBL);
                    }
                    else
                    {
                        PopulateStudentFields(retrievedStudent);

                        grpStudentInformations.Enabled = true;
                        dgvLoans.DataSource            = null;

                        grpRessourceToBorrow.Enabled    = false;
                        dgvRessourceToBorrow.DataSource = null;
                        txtSearchStudent.ResetText();

                        txtRessourceID.ResetText();

                        foreach (ValidationError error in studentBL.Errors)
                        {
                            label11.Text     += error.Description + "\n";
                            label11.ForeColor = Color.Red;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Please select  a valid row.", "Invalid Row Selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #20
0
        public IActionResult GetAnotherCountryStudents()
        {
            StudentBL studentBL         = new StudentBL(_unitOfWork, _mapper);
            var       students          = studentBL.GetAnotherCountryStudents();
            var       studentsViewModel = this._mapper.Map <Filter, FilterViewModel>(students);

            return(View(studentsViewModel));
        }
Exemple #21
0
        public IActionResult GetDiscountStudents(StudentViewModel studentViewModel)
        {
            StudentBL studentBL         = new StudentBL(_unitOfWork, _mapper);
            var       students          = studentBL.GetDiscountStudents(studentViewModel.FacultyName, studentViewModel.GroupName, studentViewModel.StudentId, studentViewModel.StartDate, studentViewModel.EndDate);
            var       studentsViewModel = this._mapper.Map <Filter, FilterViewModel>(students);

            return(View("~/Views/Student/GetDiscountStudentsPost.cshtml", studentsViewModel));
        }
        private void populateDataGriedview()
        {
            DataTable dt        = new DataTable();
            StudentBL StudentBL = new StudentBL();

            dt = StudentBL.GetExistingStudentFromBL();
            StudentdataGridView.DataSource = dt;
        }
Exemple #23
0
        public IActionResult UnPaidStudents(UnPaidStudentViewModel unPaidStudentViewModel)
        {
            StudentBL studentBL = new StudentBL(_unitOfWork, _mapper);
            var       filterForUnPaidStudents = studentBL.GetUnPaidStudents(unPaidStudentViewModel.FacultyName, unPaidStudentViewModel.GroupName);
            var       filterViewModel         = _mapper.Map <Filter, FilterViewModel>(filterForUnPaidStudents);

            return(View("~/Views/Student/UnPaidStudentsPost.cshtml", filterViewModel));
        }
Exemple #24
0
        public IActionResult GetFrequencies(FrequencyViewModel frequencyViewModel)
        {
            StudentBL studentBL            = new StudentBL(_unitOfWork, _mapper);
            var       filterForFrequencies = studentBL.GetFrequency(frequencyViewModel.AbsenceCount, frequencyViewModel.FacultyName, frequencyViewModel.GroupName);
            var       filterViewModel      = this._mapper.Map <Filter, FilterViewModel>(filterForFrequencies);

            return(View("~/Views/Student/GetFrequenciesPost.cshtml", filterViewModel));
        }
Exemple #25
0
        public IActionResult ExamResult(SubjectViewModel subjectViewModel)
        {
            StudentBL studentBL = new StudentBL(_unitOfWork, _mapper);
            var       dalFilter = studentBL.GetExamResult(subjectViewModel.SubjectName, subjectViewModel.FacultyName, subjectViewModel.GroupName, subjectViewModel.StudentId, subjectViewModel.Result);
            var       filter    = this._mapper.Map <Filter, FilterViewModel>(dalFilter);

            return(View("~/Views/Student/ExamResultPost.cshtml", filter));
        }
Exemple #26
0
 public ViewMyCoursesWindow(Student student)
 {
     InitializeComponent();
     objStudentBL     = new StudentBL();
     this.student     = new Student();
     this.student     = student;
     txtUserName.Text = student.UserID;
     LoadMyCourses();
 }
 public ViewMyHomeworkWindow(Student student)
 {
     InitializeComponent();
     studentBL        = new StudentBL();
     this.student     = new Student();
     this.student     = student;
     txtUserName.Text = student.UserID;
     LoadHomeworkGrid();
 }
 public EnrollForCourseWindow(Student student)
 {
     InitializeComponent();
     studentBL        = new StudentBL();
     this.student     = new Student();
     this.student     = student;
     txtUserName.Text = student.UserID;
     LoadEnrollCourseComboBox();
 }
 public UpdateStudentProfile(Student student)
 {
     InitializeComponent();
     studentBL        = new StudentBL();
     this.student     = new Student();
     this.student     = student;
     txtUserName.Text = student.UserID;
     LoadData();
 }
Exemple #30
0
 public void Initialize()
 {
     httpContext      = new MockHttpContextWrapper();
     DBUtils.db       = new DAL.SchoolContext(this.ConnectionString);
     studentBL        = new StudentBL();
     generator        = new EntityGenerator();
     controllerToTest = new StudentApiController();
     //controllerToTest.ControllerContext = new ControllerContext(httpContext.Context.Object, new RouteData(), controllerToTest);
 }