ส่ง code แก้ไข OP Change Request 18 ข้อ
This commit is contained in:
18
Models/rep_leave_total_02/Irep_leave_total_02Service.cs
Normal file
18
Models/rep_leave_total_02/Irep_leave_total_02Service.cs
Normal 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_leave_total_02Service
|
||||
{
|
||||
rep_leave_total_02WithSelectionViewModel GetBlankItem();
|
||||
}
|
||||
}
|
||||
|
||||
30
Models/rep_leave_total_02/rep_leave_total_02InputModel.cs
Normal file
30
Models/rep_leave_total_02/rep_leave_total_02InputModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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_leave_total_02InputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public string employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? start_date { get; set; }
|
||||
|
||||
public DateTime? end_date { 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 rep_leave_total_02ReportRequestModel : rep_leave_total_02SearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
33
Models/rep_leave_total_02/rep_leave_total_02SearchModel.cs
Normal file
33
Models/rep_leave_total_02/rep_leave_total_02SearchModel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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_leave_total_02SearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public string employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? start_date { get; set; }
|
||||
|
||||
public string start_date_text { get { return MyHelper.GetDateStringForReport(this.start_date); } }
|
||||
|
||||
public DateTime? end_date { get; set; }
|
||||
|
||||
public string end_date_text { get { return MyHelper.GetDateStringForReport(this.end_date); } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
46
Models/rep_leave_total_02/rep_leave_total_02Service.cs
Normal file
46
Models/rep_leave_total_02/rep_leave_total_02Service.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
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_leave_total_02Service : Irep_leave_total_02Service
|
||||
{
|
||||
private IBaseRepository<eva_level_scoreEntity, Guid> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public rep_leave_total_02Service(IBaseRepository<eva_level_scoreEntity, Guid> repository,
|
||||
IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public rep_leave_total_02WithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_leave_total_02WithSelectionViewModel();
|
||||
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) orderby x.fullname select x).ToList();
|
||||
i.item_org_id = (from x in ext.GetDepartmentDataForReport() orderby x.external_name select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Models/rep_leave_total_02/rep_leave_total_02ViewModel.cs
Normal file
33
Models/rep_leave_total_02/rep_leave_total_02ViewModel.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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_leave_total_02ViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public string employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? start_date { get; set; }
|
||||
|
||||
public string txt_start_date { get { return MyHelper.GetDateStringForReport(this.start_date); } }
|
||||
|
||||
public DateTime? end_date { get; set; }
|
||||
|
||||
public string txt_end_date { get { return MyHelper.GetDateStringForReport(this.end_date); } }
|
||||
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_leave_total_02WithSelectionViewModel: rep_leave_total_02ViewModel
|
||||
{
|
||||
public List<external_employeeViewModel> item_employee_id { get; set; }
|
||||
public List<external_linkageViewModel> item_org_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user