예제 #1
0
 /// <summary>
 /// Insert a MonthlySalary.
 /// </summary>
 public void Insert(Model.MonthlySalary monthlySalary)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(monthlySalary);
 }
예제 #2
0
 /// <summary>
 /// Update a MonthlySalary.
 /// </summary>
 public void Update(Model.MonthlySalary monthlySalary)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(monthlySalary);
 }
예제 #3
0
        private void LoadEmployeesByMonth()
        {
            DateTime mdate = DateTime.Parse(this.combox_anotherMonth.SelectedItem.ToString() + "-01").Date;

            this.bs_Employees.DataSource = this._EmployeeManager.GetHasThereEmp_ListByDateTime(mdate);

            if (!(mdate.Year == DateTime.Now.Year) && !(mdate.Month == DateTime.Now.Month))
            {
                IList <Model.MonthlySalary> mss = this._monthlysalarymanager.SelectForSpecialMonth(mdate.Year, mdate.Month).ToList();
                (this.bs_Employees.DataSource as List <Model.Employee>).ForEach(d =>
                {
                    try
                    {
                        Model.MonthlySalary curMS = mss.Where(ms => ms.EmployeeId == d.EmployeeId).First();
                        d.HolidayInstitution      = curMS.HolidayInstitution;
                        d.HolidayInstitutionDate  = curMS.HolidayInstitutionDate;
                    }
                    catch
                    {
                        d.HolidayInstitution     = false;
                        d.HolidayInstitutionDate = string.Empty;
                    }
                });
            }
            this.grid_MonthDate.RefreshDataSource();
            this.grid_Employees.RefreshDataSource();
        }
예제 #4
0
 public Model.MonthlySalary GetPrev(Model.MonthlySalary e)
 {
     return(sqlmapper.QueryForObject <Model.MonthlySalary>("MonthlySalary.get_prev", e));
 }
예제 #5
0
 public Model.MonthlySalary GetNext(Model.MonthlySalary e)
 {
     return(sqlmapper.QueryForObject <Model.MonthlySalary>("MonthlySalary.get_next", e));
 }
예제 #6
0
 public bool HasRowsAfter(Model.MonthlySalary e)
 {
     return(sqlmapper.QueryForObject <bool>("MonthlySalary.has_rows_after", e));
 }
예제 #7
0
 public bool HasRowsBefore(Model.MonthlySalary e)
 {
     return(sqlmapper.QueryForObject <bool>("MonthlySalary.has_rows_before", e));
 }
예제 #8
0
 public void Update(Model.MonthlySalary e)
 {
     this.Update <Model.MonthlySalary>(e);
 }
예제 #9
0
 public void Insert(Model.MonthlySalary e)
 {
     this.Insert <Model.MonthlySalary>(e);
 }
예제 #10
0
 public Model.MonthlySalary GetNext(Model.MonthlySalary e)
 {
     return(accessor.GetNext(e));
 }
예제 #11
0
 public Model.MonthlySalary GetPrev(Model.MonthlySalary e)
 {
     return(accessor.GetPrev(e));
 }
예제 #12
0
 public bool HasRowsAfter(Model.MonthlySalary e)
 {
     return(accessor.HasRowsAfter(e));
 }
예제 #13
0
 public bool HasRowsBefore(Model.MonthlySalary e)
 {
     return(accessor.HasRowsBefore(e));
 }