示例#1
0
        public ActionResult Index()
        {
            IStudentBusiness buisnes = new StudentBusiness();
            var list = buisnes.GetAll();

            return(View(list));
        }
示例#2
0
 public FormStudent()
 {
     InitializeComponent();
     studentList = StudentBusiness.GetAll();
     studentDtoBindingSource.DataSource          = studentList;
     gridViewStudent.OptionsBehavior.EditingMode = GridEditingMode.EditFormInplace;
     gridViewPriorities.Columns["Content"].BestFit();
 }
 public IHttpActionResult GetAll()
 {
     try
     {
         List <Student> students = _studentBusiness.GetAll();
         return(Ok(students));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
示例#4
0
        private void InitGridLookUpEditStudent()
        {
            InitGridLookUpEdit(gridLookUpEditStudent, StudentBusiness.GetAll(), "StudentId", "StudentId");
            var column = gridLookUpEditStudent.Properties.View.Columns;

            column["Religion"].Visible     = false;
            column["Nation"].Visible       = false;
            column["Phone"].Visible        = false;
            column["Ssn"].Visible          = false;
            column["PlaceOfBirth"].Visible = false;
            column["Address"].Visible      = false;
            column["DateOfBirth"].Visible  = false;
            column["Course"].Visible       = false;
            column["ClubId"].Visible       = false;
            column["Gender"].Visible       = false;
            column["Class"].FieldName      = "Class.ClassId";
        }
示例#5
0
        public ActionResult Index()
        {
            var list = studentBusiness.GetAll();

            return(View(list));
        }
        public void GetAllTest_ShouldEqualTwelve()
        {
            var actual = StudentBusiness.GetAll().Count;

            Assert.AreEqual(12, actual);
        }