First Initial
This commit is contained in:
22
Models/rep_leave_total/Irep_leave_totalService.cs
Normal file
22
Models/rep_leave_total/Irep_leave_totalService.cs
Normal 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_totalService
|
||||
{
|
||||
|
||||
rep_leave_totalWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
30
Models/rep_leave_total/rep_leave_totalInputModel.cs
Normal file
30
Models/rep_leave_total/rep_leave_totalInputModel.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_totalInputModel
|
||||
{
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
||||
21
Models/rep_leave_total/rep_leave_totalReportRequestModel.cs
Normal file
21
Models/rep_leave_total/rep_leave_totalReportRequestModel.cs
Normal 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_totalReportRequestModel : rep_leave_totalSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
34
Models/rep_leave_total/rep_leave_totalSearchModel.cs
Normal file
34
Models/rep_leave_total/rep_leave_totalSearchModel.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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_totalSearchModel
|
||||
{
|
||||
|
||||
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); } }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
43
Models/rep_leave_total/rep_leave_totalService.cs
Normal file
43
Models/rep_leave_total/rep_leave_totalService.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
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_totalService : Irep_leave_totalService
|
||||
{
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public rep_leave_totalService(IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public rep_leave_totalWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_leave_totalWithSelectionViewModel();
|
||||
i.item_employee_id = (from x in emp.GetListByemployee_type(null,null) select x).ToList();
|
||||
i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Models/rep_leave_total/rep_leave_totalViewModel.cs
Normal file
33
Models/rep_leave_total/rep_leave_totalViewModel.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_totalViewModel : 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_totalWithSelectionViewModel: rep_leave_totalViewModel
|
||||
{
|
||||
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