public StudentModel(EnumDepartment department) { this.Department = department; if (this.Department == null) { throw new NullReferenceException(); } switch (this.Department) { case EnumDepartment.VERBAL: { examStrategy = new VerbalStrategy(); break; } case EnumDepartment.EQUALWEIGHT: { examStrategy = new EqualWeightStrategy(); break; } case EnumDepartment.NUMERICAL: { examStrategy = new NumericalStrategy(); break; } default: break; } }
public FullTime(String fname, String lname, String social_security, EnumDepartment department, EnumCategory category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email, EnumPosition position, double asalary) : base(fname, lname, social_security, department, category, hire_date, birthday, address, home_ph, cel_ph, email) { this.position = position; this.annual_salary = asalary; }
public Internship(String fname, String lname, String social_security, EnumDepartment department, EnumCategory category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email, EnumContractType temp_position, int contract_months, Double trimester_salary) : base(fname, lname, social_security, department, category, hire_date, birthday, address, home_ph, cel_ph, email, temp_position, contract_months) { this.trimester_salary = trimester_salary; }
public PartTime(String fname, String lname, String social_security, EnumDepartment department, EnumCategory category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email, EnumContractType temp_position, int contract_months) : base(fname, lname, social_security, department, category, hire_date, birthday, address, home_ph, cel_ph, email) { this.temp_position = temp_position; this.contract_months = contract_months; }
public ConsultantTrainer(String fname, String lname, String social_security, EnumDepartment department, EnumCategory category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email, EnumContractType temp_position, int contract_months, double hourly_salary, double week_hours) : base(fname, lname, social_security, department, category, hire_date, birthday, address, home_ph, cel_ph, email, temp_position, contract_months) { this.hourly_salary = hourly_salary; this.week_hours = week_hours; }
public Employee(Employee emp) { this.fname = emp.fname; this.lname = emp.lname; this.social_security = emp.social_security; this.department = emp.department; this.category = emp.category; this.hire_date = emp.hire_date; this.birthday = emp.birthday; this.address = emp.address; this.home_ph = emp.home_ph; this.cel_ph = emp.cel_ph; this.email = emp.email; }
public Employee(String fname, String lname, String social_security, EnumDepartment department, EnumCategory category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email) { this.fname = fname; this.lname = lname; this.social_security = social_security; this.department = department; this.category = category; this.hire_date = hire_date; this.birthday = birthday; this.address = address; this.home_ph = home_ph; this.cel_ph = cel_ph; this.email = email; }
// This constructor is made for FileHandler purposes public Employee(String id, String fname, String lname, String social_security, String department, String category, Date hire_date, Date birthday, Address address, Phone home_ph, Phone cel_ph, String email, String contract) { this.id = Convert.ToInt16(id); this.fname = fname; this.lname = lname; this.social_security = social_security; this.department = (EnumDepartment)Enum.Parse(typeof(EnumDepartment), department); this.category = (EnumCategory)Enum.Parse(typeof(EnumCategory), category); this.hire_date = hire_date; this.birthday = birthday; this.address = address; this.home_ph = home_ph; this.cel_ph = cel_ph; this.email = email; this.contract = contract; }
public MCommission GetCommissionByDate(EnumDepartment department, DateTime?startDate, DateTime?endDate) { StringBuilder sql = new StringBuilder(); sql.AppendLine(@" from MCommission as comm "); sql.AppendLine(@" where comm.CommissionStatus = :department "); sql.AppendLine(@" and comm.CommissionStartDate <= :startDate "); sql.AppendLine(@" and comm.CommissionEndDate >= :endDate "); string query = string.Format(" select comm {0} ", sql); IQuery q = Session.CreateQuery(query); q.SetString("department", department.ToString()); q.SetDateTime("startDate", startDate.Value); q.SetDateTime("endDate", endDate.Value); q.SetMaxResults(1); MCommission comm = q.UniqueResult <MCommission>(); return(comm); }
// Search by Department public DataCollection search(EnumDepartment dept) { DataCollection templist = new DataCollection(); foreach (Employee curr in empList) { if (curr.getDepartment() == dept) { templist.add(curr); } } if (templist.getSize() == 0) { return(null); } else { return(templist); } }
private void SaveCommission(TRecPeriod recPeriod, EnumCommissionType enumCommissionType, EnumDepartment department, MEmployee mEmployee, int level, decimal?commissionFactor, decimal?commissionValue, string desc = null) { TCommission comm = new TCommission(); comm.SetAssignedIdTo(Guid.NewGuid().ToString()); comm.CommissionLevel = level; comm.CommissionFactor = commissionFactor; comm.CommissionValue = commissionValue; comm.EmployeeId = mEmployee; comm.CommissionType = enumCommissionType.ToString(); comm.CommissionStatus = department.ToString(); comm.RecPeriodId = recPeriod; comm.CommissionDesc = desc; comm.CreatedBy = User.Identity.Name; comm.CreatedDate = DateTime.Now; comm.DataStatus = EnumDataStatus.Updated.ToString(); _tCommissionRepository.Save(comm); }
public void setDepartment(EnumDepartment department) { this.department = department; }