Пример #1
0
 public MonthSamary(MonthSamary monthSamary)
 {
     this.mMonthName          = monthSamary.MonthName;
     this.mDefaultMonthSalary = monthSamary.DefaultMonthSalary;
     this.mDefaultHourSalary  = monthSamary.DefaultHourSalary;
     this.mMonthHistory       = new Dictionary <string, Day>(monthSamary.MonthHistory);
 }
Пример #2
0
        private void DisplayMonthData(MonthSamary month, Employee emp)
        {
            String[] row = new String[dataGridView1.ColumnCount]; String monthName = month.MonthName;
            int      DelayHours = 0; double OverTimeMin = 0.0, TotSolfa = 0.0, TotPenalty = 0.0;

            foreach (Day day in month.MonthHistory.Values)
            {
                row[0] = day.Date.Date.Month.ToString();
                row[1] = day.DayName;
                row[2] = day.ArriveTime.ToString();
                row[3] = day.LeaveTime.ToString();
                row[4] = ((double)day.DelayMinuts / 60.0).ToString();
                row[5] = day.OverTimeHours.ToString();
                row[6] = day.DelayPenaltyMoney.ToString();
                row[7] = day.Solfa.ToString();
                dataGridView1.Rows.Add(row);
            }
            row[0] = monthName;
            row[1] = "اجمالي الشهر";
            row[2] = month.TotalSalary().ToString();
            row[3] = "-----";
            row[4] = month.TotalDelayHours().ToString();
            row[5] = month.TotalOverTimeSalary().ToString();
            row[6] = month.TotalPenaltyMoney().ToString();
            row[7] = month.TotalSolfaMoney().ToString();
            dataGridView1.Rows.Add(row);
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            MonthSamary tempMonth = obj as MonthSamary;

            if (tempMonth == null)
            {
                return(false);
            }
            return(this.MonthName.Equals(tempMonth.MonthName));
        }
Пример #4
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }
            MonthSamary tempMonth = obj as MonthSamary;

            if (tempMonth != null)
            {
                return(this.MonthName.CompareTo(tempMonth.MonthName));
            }
            else
            {
                throw new ArgumentException("Object is not a Temperature");
            }
        }