First Initial

This commit is contained in:
Nakorn Rientrakrunchai
2020-02-20 15:02:39 +07:00
commit 8b98125e49
3048 changed files with 760804 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
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_summaryService
{
rep_leave_summaryWithSelectionViewModel GetBlankItem();
}
}

View 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 rep_leave_summaryInputModel
{
public Guid? id { get; set; }
public int? fiscal_year { get; set; }
public int? org_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_leave_summaryReportRequestModel : rep_leave_summarySearchModel
{
public string filetype { get; set; }
public string contentType { get { return MyHelper.GetContentType(filetype); } }
}
}

View 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_summarySearchModel
{
public Guid id { get; set; }
public int? fiscal_year { get; set; }
public int? org_id { get; set; }
public int? employee_id { get; set; }
public int? year { get { return fiscal_year; } }
public int? department_id { get { return org_id; } }
}
}

View File

@@ -0,0 +1,44 @@
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_summaryService : Irep_leave_summaryService
{
private IMyDatabase db;
private Iexternal_linkageService ext;
private Iexternal_employeeService emp;
public rep_leave_summaryService(IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
{
db = mydb;
ext = inext;
emp = inemp;
}
public rep_leave_summaryWithSelectionViewModel GetBlankItem()
{
var i = new rep_leave_summaryWithSelectionViewModel();
i.item_fiscal_year = (from x in ext.GetFiscalYear() select x).ToList();
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
i.item_employee_id = (from x in emp.GetListByemployee_type(null, null) select x).ToList();
return i;
}
}
}

View 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 rep_leave_summaryViewModel : BaseViewModel2<Guid>
{
public int? fiscal_year { get; set; }
public int? org_id { get; set; }
public int? employee_id { get; set; }
public string fiscal_year_external_linkage_external_name { get; set; }
public string org_id_external_linkage_external_name { get; set; }
public string employee_id_external_linkage_external_name { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TodoAPI2.Models
{
public class rep_leave_summaryWithSelectionViewModel: rep_leave_summaryViewModel
{
public List<external_linkageViewModel> item_fiscal_year { get; set; }
public List<external_linkageViewModel> item_org_id { get; set; }
public List<external_employeeViewModel> item_employee_id { get; set; }
}
}