コード例 #1
0
        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;
            }
        }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
        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;
        }
コード例 #5
0
        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;
        }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 // 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;
 }
コード例 #9
0
        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);
        }
コード例 #10
0
        // 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);
            }
        }
コード例 #11
0
        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);
        }
コード例 #12
0
 public void setDepartment(EnumDepartment department)
 {
     this.department = department;
 }