First Initial
This commit is contained in:
21
Models/rep_samana/Irep_samanaService.cs
Normal file
21
Models/rep_samana/Irep_samanaService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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_samanaService
|
||||
{
|
||||
rep_samanaWithSelectionViewModel GetBlankItem();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
30
Models/rep_samana/rep_samanaInputModel.cs
Normal file
30
Models/rep_samana/rep_samanaInputModel.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_samanaInputModel
|
||||
{
|
||||
|
||||
public Guid? id { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? date_from { get; set; }
|
||||
|
||||
public DateTime? date_to { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
21
Models/rep_samana/rep_samanaReportRequestModel.cs
Normal file
21
Models/rep_samana/rep_samanaReportRequestModel.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_samanaReportRequestModel : rep_samanaSearchModel
|
||||
{
|
||||
public string filetype { get; set; }
|
||||
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
31
Models/rep_samana/rep_samanaSearchModel.cs
Normal file
31
Models/rep_samana/rep_samanaSearchModel.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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_samanaSearchModel
|
||||
{
|
||||
|
||||
public Guid id { get; set; }
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? date_from { get; set; }
|
||||
|
||||
public DateTime? date_to { get; set; }
|
||||
|
||||
public int? department_id { get { return org_id; } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
43
Models/rep_samana/rep_samanaService.cs
Normal file
43
Models/rep_samana/rep_samanaService.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_samanaService : Irep_samanaService
|
||||
{
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public rep_samanaService(IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
emp = inemp;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
}
|
||||
|
||||
public rep_samanaWithSelectionViewModel GetBlankItem()
|
||||
{
|
||||
var i = new rep_samanaWithSelectionViewModel();
|
||||
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_samana/rep_samanaViewModel.cs
Normal file
33
Models/rep_samana/rep_samanaViewModel.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_samanaViewModel : BaseViewModel2<Guid>
|
||||
{
|
||||
|
||||
public int? employee_id { get; set; }
|
||||
|
||||
public int? org_id { get; set; }
|
||||
|
||||
public DateTime? date_from { get; set; }
|
||||
|
||||
public string txt_date_from { get { return MyHelper.GetDateStringForReport(this.date_from); } }
|
||||
|
||||
public DateTime? date_to { get; set; }
|
||||
|
||||
public string txt_date_to { get { return MyHelper.GetDateStringForReport(this.date_to); } }
|
||||
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public string org_id_external_linkage_external_name { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
14
Models/rep_samana/rep_samanaWithSelectionViewModel.cs
Normal file
14
Models/rep_samana/rep_samanaWithSelectionViewModel.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TodoAPI2.Models
|
||||
{
|
||||
public class rep_samanaWithSelectionViewModel: rep_samanaViewModel
|
||||
{
|
||||
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