public void FillData() { BasicRepository _basic = new BasicRepository(); BasicContants.StoredProcedure = "GetGender"; Genders = _basic.Get(); GenderList = Genders.ToGenderSelectListItems(GenderID); BasicContants.StoredProcedure = "GetStudentType"; Students = _basic.Get(); StudentList = Students.ToStudentTypeSelectListItems(StudentTypeID); SectionsRepository _section = new SectionsRepository(); BasicContants.StoredProcedure = "GetFullSectionName"; Sections = _section.Get(); SectionList = Sections.ToSectionSelectListItems(SectionID); ParentRepository _parent = new ParentRepository(); Parents = _parent.Get(); ParentList = Parents.ToParentSelectListItems(ParentID); TransportRepository _transport = new TransportRepository(); Transports = _transport.Get(); TransportList = Transports.ToTransportSelectListItems(TransportID); }
// constructor public VehicleModel() { ProcedureNameHandling.GetSP = "GetCountry"; countries = _basicRep.Get(); countrieslist = countries.ToCountrySelectListItems(CountryID); ProcedureNameHandling.GetSP = "GetStatus"; status = _basicRep.Get(); statuslist = status.ToStatusSelectListItems(StatusID); VehicleTypeRepository _vehicletyperep = new VehicleTypeRepository(); vehicletype = _vehicletyperep.Get(); vehicletypelist = vehicletype.ToVehicleTypeSelectListItems(VehicleTypeID); VehicleBusinessTypeRepository _vehiclebusinesstyperep = new VehicleBusinessTypeRepository(); vehiclebusinesstype = _vehiclebusinesstyperep.Get(); vehiclebusinesstypelist = vehiclebusinesstype.ToVehicleBusinessTypeSelectListItems(VehicleBusinessTypeID); VehicleCompanyRepository _vehiclecompanyrep = new VehicleCompanyRepository(); vehiclecompany = _vehiclecompanyrep.Get(); vehiclecompanylist = vehiclecompany.ToVehicleCompanySelectListItems(VehicleCompanyID); ProcedureNameHandling.GetSP = "GetColor"; color = _basicRep.Get(); colorlist = color.ToColorSelectListItems(ColorID); }
public CredentialsViewModel() { BasicRepository _basic = new BasicRepository(); BasicContants.StoredProcedure = "GetUserType"; UserTypes = _basic.Get(); UserTypeList = UserTypes.ToUserTypeSelectListItems(UserTypeID); }
public EmployeeAccountModel() { BasicRepository _basic = new BasicRepository(); BasicContants.StoredProcedure = "GetAdminRoles"; Roles = _basic.Get(); RoleList = Roles.ToRoleSelectListItems(RoleID); BasicContants.StoredProcedure = "GetGender"; Genders = _basic.Get(); GenderList = Genders.ToGenderSelectListItems(GenderID); BasicContants.StoredProcedure = "GetCity"; Cities = _basic.Get(); CityList = Cities.ToCitySelectListItems(CityID); BasicContants.StoredProcedure = "GetDesignation"; Designations = _basic.Get(); DesignationList = Designations.ToDesignationSelectListItems(DesignationID); }
public EmployeeUser() { DesignationsRepository _designationRep = new DesignationsRepository(); Designations = _designationRep.Get(); DesignationList = Designations.ToDesignationSelectListItems(DesignationID); DepartmentRepository _departmentRep = new DepartmentRepository(); Departments = _departmentRep.Get(); DepartmentList = Departments.ToDepartmentSelectListItems(DepartmentCode); CitiesRepository _citiesRep = new CitiesRepository(); Cities = _citiesRep.Get(); CityList = Cities.ToCitySelectListItems(CityID); ProcedureNameHandling.GetSP = "GetCountry"; Countries = _basicRep.Get(); CountriesList = Countries.ToCountrySelectListItems(Nationality); ProcedureNameHandling.GetSP = "GetGender"; Genders = _basicRep.Get(); GenderList = Genders.ToGenderSelectListItems(GenderID); ProcedureNameHandling.GetSP = "GetEducation"; Educations = _basicRep.Get(); EducationList = Educations.ToEducationSelectListItems(EducationID); ProcedureNameHandling.GetSP = "GetReligion"; Religion = _basicRep.Get(); ReligionList = Religion.ToReligionSelectListItems(ReligionID); ProcedureNameHandling.GetSP = "GetMaritalStatus"; MaritalStatusCode = _basicRep.Get(); MaritalStatusList = MaritalStatusCode.ToMaritalStatusSelectListItems(MaritalStatusID); }