เพิ่มหน้า ui รายงาน เงินเดือน
This commit is contained in:
20
Models/rpt_payroll_summary/Irpt_payroll_summaryService.cs
Normal file
20
Models/rpt_payroll_summary/Irpt_payroll_summaryService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public interface Irpt_payroll_summaryService
|
||||
{
|
||||
rpt_payroll_summaryWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
28
Models/rpt_payroll_summary/rpt_payroll_summaryInputModel.cs
Normal file
28
Models/rpt_payroll_summary/rpt_payroll_summaryInputModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summaryInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public int? rpt_year { get; set; }
|
||||
|
||||
public int? rpt_month { get; set; }
|
||||
|
||||
public int? department_id { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summaryReportRequestModel : rpt_payroll_summarySearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
27
Models/rpt_payroll_summary/rpt_payroll_summarySearchModel.cs
Normal file
27
Models/rpt_payroll_summary/rpt_payroll_summarySearchModel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summarySearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public int? rpt_year { get; set; }
|
||||
|
||||
public int? rpt_month { get; set; }
|
||||
|
||||
public int? department_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
42
Models/rpt_payroll_summary/rpt_payroll_summaryService.cs
Normal file
42
Models/rpt_payroll_summary/rpt_payroll_summaryService.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
using TodoAPI2.Models;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using TTSW.Configure;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Data;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summaryService : Irpt_payroll_summaryService
|
||||
{
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
|
||||
public rpt_payroll_summaryService(IMyDatabase mydb, Iexternal_linkageService inext)
|
||||
{
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
public rpt_payroll_summaryWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rpt_payroll_summaryWithSelectionViewModel();
|
||||
i.item_rpt_year = (from x in ext.GetFiscalYear2() orderby x.external_id descending select x).ToList();
|
||||
i.item_rpt_month = (from x in ext.GetThaiMonth() select x).ToList();
|
||||
i.item_department_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Models/rpt_payroll_summary/rpt_payroll_summaryViewModel.cs
Normal file
28
Models/rpt_payroll_summary/rpt_payroll_summaryViewModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TTSW.EF;
|
||||
using TTSW.Utils;
|
||||
using TTSW.Constant;
|
||||
using TTSW.Common;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summaryViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public int? rpt_year { get; set; }
|
||||
|
||||
public int? rpt_month { get; set; }
|
||||
|
||||
public int? department_id { get; set; }
|
||||
|
||||
public string rpt_year_external_linkage_external_name { get; set; }
|
||||
public string rpt_month_external_linkage_external_name { get; set; }
|
||||
public string department_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rpt_payroll_summaryWithSelectionViewModel: rpt_payroll_summaryViewModel
|
||||
{
|
||||
public List<external_linkageViewModel> item_rpt_year { get; set; }
|
||||
public List<external_linkageViewModel> item_rpt_month { get; set; }
|
||||
public List<external_linkageViewModel> item_department_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user