รายงาน กพ7

This commit is contained in:
Nakorn Rientrakrunchai
2020-09-07 17:39:34 +07:00
parent 717af2bf38
commit 8762bcaead
14 changed files with 526 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
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 Irep_kp7Service
{
rep_kp7WithSelectionViewModel GetBlankItem();
}
}

View File

@@ -0,0 +1,24 @@
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 rep_kp7InputModel
{
public Guid? id { get; set; }
public int? employee_id { get; set; }
public string active_mode { get; set; }
}
}

View File

@@ -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 rep_kp7ReportRequestModel : rep_kp7SearchModel
{
public string filetype { get; set; }
public string contentType { get { return MyHelper.GetContentType(filetype); } }
}
}

View File

@@ -0,0 +1,23 @@
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 rep_kp7SearchModel
{
public Guid id { get; set; }
public int? employee_id { get; set; }
}
}

View 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 rep_kp7Service : Irep_kp7Service
{
private IMyDatabase db;
private Iexternal_linkageService ext;
private Iexternal_employeeService emp;
public rep_kp7Service(IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
{
db = mydb;
ext = inext;
emp = inemp;
}
public rep_kp7WithSelectionViewModel GetBlankItem()
{
var i = new rep_kp7WithSelectionViewModel();
i.item_employee_id = (from x in emp.GetAllEmployee() select x).ToList();
return i;
}
}
}

View File

@@ -0,0 +1,22 @@
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 rep_kp7ViewModel : BaseViewModel2<Guid>
{
public int? employee_id { get; set; }
public string employee_id_external_linkage_external_name { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TodoAPI2.Models
{
public class rep_kp7WithSelectionViewModel: rep_kp7ViewModel
{
public List<external_employeeViewModel> item_employee_id { get; set; }
}
}