Commit 6cf0550b by Anas Azhari

commit 1st

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Common
{
public class Helper
{
#region Console App Helper
public static void LogMessage(string strMessage)
{
string strLogFile = Utilities.GetAppSetting(Constant.AppLog.LogPath);
string strLogFileName = string.Format(Utilities.GetAppSetting(Constant.AppLog.LogName), DateTime.Now.ToString(Utilities.GetAppSetting(Constant.AppLog.LogDateTimeFormat)));
if (string.IsNullOrEmpty(strLogFile.Trim()))
strLogFile = Utilities.GetAppPath();
bool blnLogEnabled = Convert.ToBoolean(Utilities.GetAppSetting(Constant.AppLog.LogEnabled));
if (blnLogEnabled)
{
using (System.IO.StreamWriter sw = new StreamWriter(strLogFile + @"\" + strLogFileName, true))
{
sw.WriteLine(DateTime.Now + ": " + strMessage);
}
}
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Common
{
public class LogWriter
{
private string m_exePath = string.Empty;
public LogWriter(string logMessage)
{
LogWrite(logMessage);
}
public static void LogMessage(string strMessage)
{
Helper.LogMessage(strMessage);
//string strLogFolder = @"C:\CRMLog";
//bool folderExists = Directory.Exists(strLogFolder);
//if (!folderExists)
// Directory.CreateDirectory(strLogFolder);
//if (string.IsNullOrEmpty(strLogFolder))
//{
// strLogFolder = Utilities.GetAppPath();
//}
//string strLogFile = "Logger_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
//bool fileExists = Directory.Exists(strLogFile);
//if (!fileExists)
// Directory.CreateDirectory(strLogFolder + "//" + strLogFile);
//if (string.IsNullOrEmpty(strLogFile))
//{
// strLogFile = Utilities.GetAppPath();
//}
//bool blnLogEnabled = true;
//if (blnLogEnabled)
//{
// using (System.IO.StreamWriter sw = new StreamWriter(strLogFolder + "\\" + strLogFile, true))
// {
// sw.WriteLine(DateTime.Now + ": " + strMessage);
// }
//}
}
public void LogWrite(string logMessage)
{
m_exePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
try
{
using (StreamWriter w = File.AppendText(m_exePath + "\\" + "log.txt"))
{
Log(logMessage, w);
}
}
catch (Exception ex)
{
}
}
public void Log(string logMessage, TextWriter txtWriter)
{
try
{
txtWriter.Write("\r\nLog Entry : ");
txtWriter.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(),
DateTime.Now.ToLongDateString());
txtWriter.WriteLine(" :");
txtWriter.WriteLine(" :{0}", logMessage);
txtWriter.WriteLine("-------------------------------");
}
catch (Exception ex)
{
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC
{
public class NotFoundException : Exception
{
public NotFoundException() : base("Not Found")
{
}
public NotFoundException(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC
{
public class PageAccessUnauthorizedException : Exception
{
public PageAccessUnauthorizedException() : base("Page Not Authorized") { }
public PageAccessUnauthorizedException(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Common
{
public class RouteToAgentException : SystemException
{
public RouteToAgentException() : base(Constant.Exception.RouteToAgent)
{
}
public RouteToAgentException(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC
{
public class SystemAccessUnauthorizedException : Exception
{
public SystemAccessUnauthorizedException() : base("System Not Authorized") { }
public SystemAccessUnauthorizedException(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC
{
public class UnhandledError : Exception
{
public UnhandledError() : base("Something went wrong")
{
}
public UnhandledError(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC
{
public class UnsupportedFileTypeException : Exception
{
public UnsupportedFileTypeException() : base("File type not supported!") { }
public UnsupportedFileTypeException(string message) : base(message)
{
}
}
}
using LHDN.CRM.BC.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static LHDN.CRM.BC.Common.Constant;
namespace LHDN.CRM.BC
{
public class UpdateConflictException : SystemException
{
public UpdateConflictException() : base(Constant.Exception.UpdateConflict)
{
}
public UpdateConflictException(string message) : base(message)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.ViewModels
{
public class DownloadManualViewModel
{
public int ManualID { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Principal;
using LHDN.CRM.Models.ViewModels;
namespace LHDN.CRM.BC.Filters
{
public class CustomPrincipal : WindowsPrincipal
{
public UserInfoViewModel User { get; protected set; }
public CustomPrincipal(WindowsIdentity source, UserInfoViewModel baseUser) :
base(source)
{
User = baseUser;
}
public override bool IsInRole(string role)
{
return (base.IsInRole(role) ||
(
User != null &&
User.RolesObj != null &&
User.RolesObj.Count > 0 &&
User.RolesObj.Any(x => x.RoleCode.ToString() == role)
));
}
}
}
using System;
using System.Linq;
using System.Linq.Expressions;
namespace LHDN.CRM.BC.Interfaces
{
public interface IBaseRepository<T> where T : class
{
IQueryable<T> GetAll();
IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);
void Add(T entity);
void Delete(T entity);
void Edit(T entity);
void Save();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Interfaces
{
public interface IService<T> where T : class
{
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5D7FF2DA-204C-4633-9C6A-1C1239B96C99}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LHDN.CRM.BC</RootNamespace>
<AssemblyName>LHDN.CRM.BC</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\LHDN.CRM.BC.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ClosedXML, Version=0.94.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.94.2\lib\net46\ClosedXML.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.0.3.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.0.3\lib\net20\ExcelNumberFormat.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FastMember, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FastMember.1.3.0\lib\net45\FastMember.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Packaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Packaging.4.0.0\lib\net46\System.IO.Packaging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Common\Constant.cs" />
<Compile Include="Common\Extensions.cs" />
<Compile Include="Common\Helper.cs" />
<Compile Include="Common\Logger.cs" />
<Compile Include="Common\NotFoundException.cs" />
<Compile Include="Common\PageAccessUnauthorizedException.cs" />
<Compile Include="Common\RouteToAgentException.cs" />
<Compile Include="Common\SystemAccessUnauthorizedException.cs" />
<Compile Include="Common\UnhandledError.cs" />
<Compile Include="Common\UnsupportedFileTypeException.cs" />
<Compile Include="Common\UpdateConflictException.cs" />
<Compile Include="Common\Utilities.cs" />
<Compile Include="DownloadManualViewModel.cs" />
<Compile Include="Filters\CustomPrincipal.cs" />
<Compile Include="Interfaces\IBaseRepository.cs" />
<Compile Include="Interfaces\IService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Repositories\ActivityRepository.cs" />
<Compile Include="Repositories\AdminRepository.cs" />
<Compile Include="Repositories\AuditRepository.cs" />
<Compile Include="Repositories\BaseRepository.cs" />
<Compile Include="Repositories\CaseRepository.cs" />
<Compile Include="Repositories\ChangeHistoryRepository.cs" />
<Compile Include="Repositories\EmailRepository.cs" />
<Compile Include="Repositories\ErrorRepository.cs" />
<Compile Include="Repositories\GeneralRepository.cs" />
<Compile Include="Repositories\OutboundRepository.cs" />
<Compile Include="Repositories\PerfLogRepository.cs" />
<Compile Include="Repositories\SearchRepository.cs" />
<Compile Include="Repositories\TaskRepository.cs" />
<Compile Include="Repositories\TaxPayerRepository.cs" />
<Compile Include="Repositories\UserRepository.cs" />
<Compile Include="Repositories\WorkflowRepository.cs" />
<Compile Include="Resources\Messages.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Messages.resx</DependentUpon>
</Compile>
<Compile Include="Services\ActivityService.cs" />
<Compile Include="Services\AdminService.cs" />
<Compile Include="Services\AuditService.cs" />
<Compile Include="Services\CachingService.cs" />
<Compile Include="Services\CaseService.cs" />
<Compile Include="Services\EmailService.cs" />
<Compile Include="Services\ErrorService.cs" />
<Compile Include="Services\GeneralService.cs" />
<Compile Include="Services\OutboundService.cs" />
<Compile Include="Services\SearchService.cs" />
<Compile Include="Services\ServiceBase.cs" />
<Compile Include="Services\TaskService.cs" />
<Compile Include="Services\TaxPayerService.cs" />
<Compile Include="Services\UserProfileService.cs" />
<Compile Include="Services\WorkflowService.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LHDN.CRM.Models\LHDN.CRM.Models.csproj">
<Project>{0cb248b5-d90f-450f-b9e7-8afe44485cbb}</Project>
<Name>LHDN.CRM.Models</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Messages.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Messages.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("LHDN.CRM.BC")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LHDN.CRM.BC")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5d7ff2da-204c-4633-9c6a-1c1239b96c99")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using LHDN.CRM.Models.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity.Validation;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Repositories
{
public class AuditRepository : BaseRepository<CRMContext, AuditMaster>
{
public long SaveAudit(AuditMaster model)
{
try
{
Add(model);
Save();
}
catch (DbEntityValidationException e)
{
string strErr = "";
foreach (var eve in e.EntityValidationErrors)
{
strErr += string.Format("Entity of type \"{0}\" in state \"{1}\" has the following validation errors:",
eve.Entry.Entity.GetType().Name, eve.Entry.State);
foreach (var ve in eve.ValidationErrors)
{
strErr += String.Format("- Property: \"{0}\", Error: \"{1}\"",
ve.PropertyName, ve.ErrorMessage);
}
}
throw;
}
catch (Exception ex)
{
string strError = ex.Message;
}
return model.AuditID;
}
}
}
using LHDN.CRM.Models.Models;
namespace LHDN.CRM.BC.Repositories
{
public class ChangeHistoryRepository : BaseRepository<CRMContext, TP_ChangeHistory >
{
public long SaveChangeHistory(TP_ChangeHistory model)
{
Add(model);
Save();
return model.TPChangeHisID;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using LHDN.CRM.Models.Models;
using LHDN.CRM.BC.Common;
using LHDN.CRM.Models.ViewModels;
namespace LHDN.CRM.BC.Repositories
{
public class EmailRepository: BaseRepository<CRMContext, EmailQueue>
{
public DataSet GetBookmarkValue(int intTemplateID, long lngRefTableID,bool isActAssign = false)
{
List<object> lstParam = new List<object>(new object[] {
"@TemplateID", intTemplateID,
"@RefTableID", lngRefTableID,
"@IsActAssignTemplate",isActAssign
});
return ExecuteSP("proc_GetBookmarkValue", lstParam.ToArray());
}
public DataSet GetCorrespondenceTemplateByID(int templateId)
{
List<object> lstParam = new List<object>(new object[] {
"@TemplateID", templateId
});
return ExecuteSP("proc_GetCorrespondenceTemplateByID", lstParam.ToArray());
}
public long SendEmailNotification(EmailQueueViewModel emailqueue, DateTime now)
{
long i = ExecuteUpdateSP("proc_InsertEmailQueue", "@From", emailqueue.From,
"@SendTo", emailqueue.To,
"@CC", emailqueue.CC,
"@BCC", emailqueue.BCC,
"@Subject", emailqueue.Subject,
"@Body", emailqueue.Body,
"@FailAttempt",0,
"@CreatedBy", emailqueue.CreatedBy,
"@CreatedDateTime",now,
"@LastUpdatedBy", emailqueue.LastUpdatedBy,
"@LastUpdatedDateTime",now,
"@AttachmentTableType", emailqueue.AttachmentTableType,
"@RefAttachmentTableID", emailqueue.RefAttachmentTableID);
return i;
}
public List<EmailQueueViewModel> GetEmailQueueList()
{
return ExecuteSP<EmailQueueViewModel>("proc_GetEmailQueueList").ToList();
}
public List<EmailQueueAttachmentViewModel> GetEmailQueueAttachmentList()
{
return ExecuteSP<EmailQueueAttachmentViewModel>("proc_GetEmailQueueAttachmentList").ToList();
}
public void InsertEmailHist(long lngEmailQueueID)
{
ExecuteSP("proc_InsertEmailHist", "@EmailQueueID", lngEmailQueueID,
"@EmailSentOn", DateTime.Now);
}
public void DeleteEmailQueue(long lngEmailQueueID)
{
ExecuteSP("proc_DeleteEmailQueue", "@EmailQueueID", lngEmailQueueID);
}
public void UpdateEmailFailAttempt(EmailQueueViewModel objEmail)
{
ExecuteSP("proc_UpdateEmailFailAttempt", "@EmailQueueID", objEmail.EmailQueueID,
"@LastUpdatedBy", objEmail.CreatedBy,
"@LastUpdatedDateTime", objEmail.CreatedDateTime);
}
public List<CaseKategoriDocReceivedViewModel> GetAllKategoryDocumentByRefID(long ReftableID,int TableType,string ActDocID="")
{
List<CaseKategoriDocReceivedViewModel> lst = new List<CaseKategoriDocReceivedViewModel>();
DataSet ds = new DataSet();
if(TableType == (int)Constant.TableType.Activity)
{
ds = ExecuteSP("proc_GetActDocReceivedForCase", "@CaseID", 0, "@ActID", ReftableID);
}
else
{
if(ActDocID != "" && ActDocID != null)
{
ds = ExecuteSP("proc_GetActDocReceivedForCase", "@CaseID", 0, "@ActID", ReftableID);
}
//else
//{
// ds = ExecuteSP("proc_GetActDocReceivedForCase", "@CaseID", ReftableID, "@ActID", 0);
//}
}
if (ds.Tables.Count>0)
{
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
var actDocLst = DataTableToList<ActDocReceivedViewModel>(ds.Tables[0]).ToList();
//distint activity list
var activityLst = actDocLst.GroupBy(x => x.ActivityID).Select(grp => grp.First()).ToList();
foreach (var a in activityLst)
{
CaseKategoriDocReceivedViewModel obj = new CaseKategoriDocReceivedViewModel
{
ActivityID = a.ActivityID,
ActRefNo = a.ActRefNo,
KategoriDocReceived = new List<KategoriDocReceived>()
};
lst.Add(obj);
}
//get each activity kat doc list
foreach (var a in lst)
{
var katDocLst = actDocLst.Where(x => x.ActivityID == a.ActivityID).GroupBy(x => x.DocListID).Select(grp => grp.First()).ToList();
List<KategoriDocReceived> _lstKatDoc = new List<KategoriDocReceived>();
foreach (var b in katDocLst)
{
KategoriDocReceived obj = new KategoriDocReceived
{
DocListID = b.DocListID,
KategoriDocCode = b.KategoriDocCode,
KategoriDocName = b.KategoriDocName,
ActDocReceived = new List<ActDocReceivedViewModel>()
};
a.KategoriDocReceived.Add(obj);
}
}
//get each doc list act doc received
foreach (var a in lst)
{
foreach (var b in a.KategoriDocReceived)
{
foreach (var c in actDocLst)
{
if (c.ActivityID == a.ActivityID && c.DocListID == b.DocListID)
{
b.ActDocReceived.Add(c);
}
}
}
}
}
}
return lst;
}
}
}
using LHDN.CRM.Models.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Repositories
{
public class ErrorRepository : BaseRepository<CRMContext, ErrorLog>
{
public long LogError(ErrorLog model)
{
Add(model);
Save();
return model.ErrorLogID;
}
}
}
using LHDN.CRM.Models.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Repositories
{
public class PerfLogRepository : BaseRepository<CRMContext, PerfLog>
{
public void Log(PerfLog entity)
{
Add(entity);
Save();
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LHDN.CRM.BC.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Messages {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Messages() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LHDN.CRM.BC.Resources.Messages", typeof(Messages).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to TIDAK.
/// </summary>
public static string FalseDescription {
get {
return ResourceManager.GetString("FalseDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Tarikh Janji Bayar untuk P.C. (No.Cukai:{0}).
/// </summary>
public static string PromiseToPayMessage {
get {
return ResourceManager.GetString("PromiseToPayMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Tarikh Janji Bayar.
/// </summary>
public static string PromiseToPayTitle {
get {
return ResourceManager.GetString("PromiseToPayTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to YA.
/// </summary>
public static string TrueDescription {
get {
return ResourceManager.GetString("TrueDescription", resourceCulture);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="FalseDescription" xml:space="preserve">
<value>TIDAK</value>
</data>
<data name="PromiseToPayMessage" xml:space="preserve">
<value>Tarikh Janji Bayar untuk P.C. (No.Cukai:{0})</value>
</data>
<data name="PromiseToPayTitle" xml:space="preserve">
<value>Tarikh Janji Bayar</value>
</data>
<data name="TrueDescription" xml:space="preserve">
<value>YA</value>
</data>
</root>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
using LHDN.CRM.BC.Repositories;
using LHDN.CRM.Models.Models;
using LHDN.CRM.Models.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
namespace LHDN.CRM.BC.Services
{
public class AuditService : ServiceBase<AuditMaster>
{
private AuditRepository auditRepo = new AuditRepository();
public enum ResultType
{
Failed = 'F',
Success = 'S'
}
public enum ActionType
{
Add,
Update,
Delete,
Approve,
Cancel,
Reject,
ViewReport,
GenerateReport,
View
}
public enum AuditEventID
{
Login = 10001,
Logout = 10002,
Dashboard = 10003,
ViewTaxPayer = 20001,
UpdateTaxPayers = 20002,
SearchTaxPayer = 20003,
ViewActivityProfile = 30001,
CreateUpdateActivityProfile = 30002,
CreateUpdateActivityCatatan = 30003,
SearchActivityCatatan = 30004,
AssignActivityProfile = 30005,
ViewMyPendingActivity = 30006,
DeleteActivity = 30007,
ReopenActivity = 30008,
ViewDMSDocumentActivity = 30009,
PrintNotaTemudugaActivity = 30010,
RetrieveTranscript = 30011,
RetrieveEmailContent = 30012,
CreateActivityDraft = 30013,
SendEmail = 30014,
ViewCaseProfile = 40001,
CreateUpdateCaseProfile = 40002,
TransfertoCase = 40003,
SearchCaseProfle = 40004,
CreateUpdateCaseCatatan = 40005,
AssignBackOffice = 40006,
ViewMyPendingCase = 40007,
CloseCase = 40008,
ReopenCase = 40009,
ReassignCase = 40010,
ViewDMSDocumentCase = 40011,
PrintNotaTemudugaCase = 40012,
DeleteCase = 40013,
CreateUpdateTask = 50001,
DeleteTask = 50002,
ViewTask = 50003,
SearchTask = 50004,
UploadHCLEmail = 60001,
SearchHCLEmailBlastList = 60002,
ViewHCLEmailBlastProfile = 60003,
EditHCLEmailBlastProfile = 60004,
ManageHCLEmailBlastSegmentisation = 60005,
ManageHCLEmailBlastCampaign = 60006,
RejectHCLEmailBlastList = 60007,
VerifyHCLEmailBlastList = 60008,
LockHCLEmailBlastList = 60009,
ReleaseHCLEmailBlastList = 60010,
SearchOutboundList = 70001,
ViewOutboundProfile = 70002,
EditOutboundProfile = 70003,
ManageSegmentisation = 70004,
ManageCampaign = 70005,
ReturnOutboundList = 70006,
VerifyOutboundList = 70007,
LockOutboundList = 70008,
ReleaseOutboundList = 70009,
CreateUpdateUserRole = 80001,
ManageParameter = 80002
}
public long SaveAudit(int auditEventID,
ResultType resultType,
ActionType actionType,
string userID,
string creator,
DateTime createdDate,
string additionalInfo = null,
List<AuditDetailViewModel> lstAuditDetails = null,
string refTableName = null,
long? refTableID = null)
{
long auditID = 0;
AuditEvent evt = AdminService.AuditEvents.First(e => e.AuditEventID == auditEventID);
AuditMaster objAuditMaster = new AuditMaster()
{
AuditModule = evt.AuditModule,
AuditEventID = evt.AuditEventID,
AuditEventName = evt.AuditEventName,
ResultType = ((char)resultType).ToString(),
ActionType = Enum.GetName(typeof(ActionType), actionType),
AdditionalInfo = additionalInfo,
RefTableName = refTableName,
RefTableID = refTableID,
UserID = userID,
CreatedBy = creator,
CreatedDateTime = createdDate
};
if (lstAuditDetails != null && lstAuditDetails.Count > 0)
{
var details = from d in lstAuditDetails
select new AuditDetail
{
FieldName = d.FieldName,
OldValue = d.OldValue,
NewValue = d.NewValue,
CreatedBy = creator,
CreatedDateTime = createdDate
};
objAuditMaster.AuditDetails = details.ToList();
}
auditID = auditRepo.SaveAudit(objAuditMaster);
return auditID;
}
}
}
using LHDN.CRM.BC.Common;
using LHDN.CRM.Models.ViewModels;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Caching;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Services
{
public class CachingService
{
internal static ObjectCache _cache = MemoryCache.Default;
private const int defaultCacheDuration = 60;
public static bool TryGet<T>(string cacheKey, out T cacheItem)
{
cacheItem = (T)_cache[cacheKey];
return cacheItem != null;
}
public static bool ClearAll()
{
List< string > cacheKeys = _cache.Select(kvp => kvp.Key).ToList();
foreach (string cacheKey in cacheKeys)
{
_cache.Remove(cacheKey);
}
return true;
}
public static bool Clear(string cacheKey)
{
return _cache.Select(kvp => kvp.Key).ToList().Remove(cacheKey);
}
public static bool TrySetOrUpdate<T>(string cacheKey, Func<T> getItem, out T returnData, int? cacheDuration = null, CacheItemPolicy policy = null)
{
returnData = default(T);
//LogWriter.LogMessage("TrySetOrUpdate : " + cacheKey);
if (_cache.Contains(cacheKey))
{
//LogWriter.LogMessage("Contains cache item");
_cache.Remove(cacheKey);
//LogWriter.LogMessage("Removed cache item");
CacheItemPolicy p = policy ?? new CacheItemPolicy() { AbsoluteExpiration = DateTime.Now.AddSeconds(cacheDuration.HasValue ? cacheDuration.Value : defaultCacheDuration) };
// Reset cache item
returnData = getItem();
//LogWriter.LogMessage("Get new cache item");
if (returnData != null)
{
//LogWriter.LogMessage("Return Value not null");
_cache.Add(cacheKey, returnData, p);
}
//LogWriter.LogMessage("return result" + Convert.ToBoolean(returnData != null).ToString());
return returnData != null;
}
//else
//{
// LogWriter.LogMessage("No cache item");
//}
return true;
}
public static bool TryGetOrAdd<T>(string cacheKey, Func<T> getItem, out T returnData, int? cacheDuration = null, CacheItemPolicy policy = null)
{
if (TryGet<T>(cacheKey, out returnData))
{
return true;
}
CacheItemPolicy p = policy ?? new CacheItemPolicy() { AbsoluteExpiration = DateTime.Now.AddSeconds(cacheDuration.HasValue ? cacheDuration.Value : defaultCacheDuration) };
returnData = getItem();
if (returnData != null)
{
_cache.Add(cacheKey, returnData, p);
}
return returnData != null;
}
public static Dictionary<string, T> ContainsKey<T>(string cacheKey)
{
Dictionary<string, T> dicObj = _cache.AsEnumerable().Where(x => x.Key.Contains(cacheKey)).ToDictionary(x=> x.Key, x=>(T)x.Value);
return dicObj;
}
//public static bool TryGetOrAdd<T>(string cacheKey, Func<T> getItem, out T returnData, CacheItemPolicy policy = null)
//{
// if (TryGet<T>(cacheKey, out returnData))
// {
// return true;
// }
// CacheItemPolicy p = policy ?? new CacheItemPolicy() { AbsoluteExpiration = DateTime.Now.AddSeconds(defaultCacheDuration) };
// returnData = getItem();
// if (returnData != null)
// {
// _cache.Add(cacheKey, returnData, p);
// }
// return returnData != null;
//}
}
}
using LHDN.CRM.BC.Repositories;
using LHDN.CRM.Models.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Services
{
public class ErrorService : ServiceBase<ErrorLog>
{
private ErrorRepository errRepo = new ErrorRepository();
public long LogError(string additionalInfo, string userId)
{
long errorLogID = 0;
ErrorLog log = new ErrorLog()
{
System = "LHDN.CRM",
AdditionalInfo = additionalInfo,
UserID = userId,
CreatedBy = "System",
CreatedDateTime = DateTime.Now
};
errorLogID = errRepo.LogError(log);
return errorLogID;
}
public long LogError(string additionalInfo, string userId, string system)
{
long errorLogID = 0;
ErrorLog log = new ErrorLog()
{
System = system,
AdditionalInfo = additionalInfo,
UserID = userId,
CreatedBy = "System",
CreatedDateTime = DateTime.Now
};
errorLogID = errRepo.LogError(log);
return errorLogID;
}
}
}
using LHDN.CRM.Models.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using Newtonsoft.Json;
namespace LHDN.CRM.BC.Services
{
public class GeneralService
{
private Repositories.GeneralRepository repo = new Repositories.GeneralRepository();
private BC.Services.UserProfileService userSvc = new UserProfileService();
public DashboardTilesViewModel GetDashboardTilesCount(string strCurrentUserID)
{
return repo.GetDashboardTilesCount(strCurrentUserID);
}
public MyNotificationDashboardTaskListViewModel GetMyDashboardNotifcation(string CreatedBy, MyNotificationDashboardTaskListViewModel paging, out int intCount)
{
MyNotificationDashboardTaskListViewModel lstNotifyDashboard = new MyNotificationDashboardTaskListViewModel();
intCount = 0;
if (paging.IsSeeFullList)
{
DataSet ds = repo.GetAlertFullDetail(CreatedBy, paging);
List<TaskAlertViewModel> TaskAlertList = new List<TaskAlertViewModel>();
if (ds != null && ds.Tables.Count > 0)
{
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
TaskAlertList = repo.DataTableToList<TaskAlertViewModel>(ds.Tables[0]).ToList();
if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
intCount = Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString());
}
lstNotifyDashboard.TaskListAlert = TaskAlertList;
lstNotifyDashboard.TotalNotification = intCount;
}
else
{
lstNotifyDashboard = repo.GetMyDashboardNotification(CreatedBy, paging);
}
return lstNotifyDashboard;
}
public long InsertTaskAlertNotify(string strCurrentLoginId, Int32 intTableTypeId, long lngRefID, int intMessageTypeID, string strDescription, string strURL, bool blnIsRead, string strCreatedBy, string strCreatedByName,
DateTime dtCreatedDateTime)
{
return repo.InsertTaskAlertNotify(strCurrentLoginId, intTableTypeId, lngRefID, intMessageTypeID, strDescription, strURL, blnIsRead, strCreatedBy, strCreatedByName,
dtCreatedDateTime);
}
public TaskAlertViewModel UpdateAlertContent(MyNotificationDashboardTaskListViewModel paging)
{
TaskAlertViewModel vmTaskAlertDetail = new TaskAlertViewModel();
vmTaskAlertDetail = repo.UpdateAlertContent(paging.IsContentRead, paging.TaskAlertID);
return vmTaskAlertDetail;
}
public AdvancedRulesMainViewModel GetAdvancedRulesDetails(int intViewID, int intTableType)
{
var data = repo.GetAdvancedRulesDetails(intViewID, intTableType);
if (data == null)
throw new NotFoundException("Advanced Rules not found!");
else
data.DisplaySetting = GetDisplaySetting(intTableType, intViewID, 0);
return data;
}
public DashboardTilesStatusViewModel GetActDashboardWidget()
{
return repo.GetActDashboardWidget();
}
public TaskAlertViewModel GetTaskAlertDetail(string strCurrentUserID, long reftableID)
{
TaskAlertViewModel taskAlertDetail = new TaskAlertViewModel();
taskAlertDetail = repo.GetTaskAlertDetail(strCurrentUserID, reftableID);
return taskAlertDetail;
}
public DisplaySettingViewModel GetDisplaySetting(int intTableType, int intViewID, int intJenisKempenID)
{
DisplaySettingViewModel obj = new DisplaySettingViewModel();
if (intViewID != 0)
{
obj = repo.GetDisplayColSavedView(intTableType, intViewID);
}
else
{
obj = repo.GetDisplayColSystemView(intTableType, intJenisKempenID);
}
return obj;
}
public List<DashboardDisplayColumn> GetDashboardDisplaySetting(int intTableType, int intViewID)
{
List<DashboardDisplayColumn> obj = new List<DashboardDisplayColumn>();
if (intViewID != 0)
{
obj = repo.GetDashboardDisplayCol(intTableType, intViewID);
}
return obj;
}
public DashboardViewModel GetDashboardbyLoginUnit(int DashboardID)
{
DashboardViewModel obj = new DashboardViewModel();
if (CheckDashboardPermission(DashboardID))
{
obj = repo.GetDashboardbyLoginUnit(DashboardID, userSvc.UserInfo.UserProfileID);
if (obj == null || obj.DashboardID == 0)
{
throw new NotFoundException("Dashboard not found!");
}
obj.IsAllowAccess = true;
}
else {
obj.IsAllowAccess = false;
throw new UnauthorizedAccessException();
}
return obj;
}
public List<SearchSavedViewViewModel> GetDashboardDynamicCol(SearchViewColumnViewModel vm)
{
return repo.GetDashboardDynamicCol(vm.ViewID, vm.TableType);
}
public dynamic GetDashboardTableResults(DashboardPagedListViewModel paging, out int intCount)
{
intCount = 0;
DataSet ds = repo.GetDashboardTableResults(paging.SortExpression, paging.PageIndex, paging.Length,
paging.ViewID, paging.ViewType, userSvc.UserInfo.LoginID);
object lst = new List<DashboardPagedListViewModel>();
if (ds != null && ds.Tables.Count > 0)
{
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
lst = JsonConvert.DeserializeObject<dynamic>(JsonConvert.SerializeObject(ds.Tables[0]));
if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
intCount = Convert.ToInt32(ds.Tables[1].Rows[0][0].ToString());
}
return lst;
}
public ChartList GetDashboardChartResult(DashboardPagedListViewModel paging)
{
ChartList obj = new ChartList();
obj = repo.GetDashboardChartResult(paging.DashboardZonID, paging.ViewID, paging.ViewType,
paging.xFieldMappingID, paging.yFieldMappingID, userSvc.UserInfo.LoginID);
if (obj == null)
{
throw new NotFoundException("Dashboard not found!");
}
return obj;
}
public bool CheckDashboardPermission(int DashboardID)
{
bool isAllowed = false;
isAllowed = repo.CheckDashboardPermission(DashboardID, userSvc.UserInfo.UserProfileID);
return isAllowed;
}
public List<DashboardViewModel> GetDashboardList()
{
return repo.GetDashboardList(userSvc.UserInfo.UserProfileID);
}
public AdvancedRulesMainViewModel DeleteViewConfig(int intViewID, int intTableType,string lastupdateBy,string lastupdateByName,DateTime now)
{
AdvancedRulesMainViewModel ruleModel = new AdvancedRulesMainViewModel();
ruleModel = repo.DeleteViewConfig(intViewID, intTableType, lastupdateBy, lastupdateByName,now);
return ruleModel;
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
using LHDN.CRM.BC.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.BC.Services
{
public abstract class ServiceBase<T> : IService<T>, IDisposable
where T : class
{
#region IDisposable Support
private bool disposedValue = false; // To detect redundant calls
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
// TODO: dispose managed state (managed objects).
}
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
// TODO: set large fields to null.
disposedValue = true;
}
}
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
// ~ServiceBase() {
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
// Dispose(false);
// }
// This code added to correctly implement the disposable pattern.
public void Dispose()
{
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose(true);
// TODO: uncomment the following line if the finalizer is overridden above.
// GC.SuppressFinalize(this);
}
#endregion
//public virtual bool CompareByteArray(byte[] obj1, byte[] obj2)
//{
// bool blnSame = false;
// if (obj1 != null && obj2 != null)
// {
// blnSame = Convert.ToBase64String(obj1) == Convert.ToBase64String(obj2);
// }
// return blnSame;
//}
//public virtual object GetPropertyValue(object obj, string propertyName)
//{
// return obj.GetType().GetProperty(propertyName) == null ? "" : obj.GetType().GetProperty(propertyName).GetValue(obj, null);
//}
//public virtual bool CompareDateTime(object obj1, object obj2)
//{
// bool blnResult;
// if (obj1 is DateTime && obj2 is DateTime)
// {
// if (Convert.ToDateTime(obj1).ToString("yyyyMMddHHmmss") != Convert.ToDateTime(obj2).ToString("yyyyMMddHHmmss"))
// {
// blnResult = false;
// }
// else
// {
// blnResult = true;
// }
// }
// else
// {
// blnResult = false;
// }
// return blnResult;
//}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.94.2" targetFramework="net46" />
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net46" />
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="ExcelNumberFormat" version="1.0.3" targetFramework="net46" />
<package id="FastMember" version="1.3.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net46" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net46" />
<package id="System.IO.Packaging" version="4.0.0" targetFramework="net46" />
</packages>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="LHDN.CRM" connectionString="data source=DESKTOP-SF5S9RK\MSSQL2016;initial catalog=LHDN.CRM;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
<add name="CCTemplate" connectionString="data source=DESKTOP-U78NF2B;initial catalog=LHDN.CRM;integrated security=False;user id=crm;multipleactiveresultsets=True;application name=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models
{
public class BaseEntity
{
}
//Generic Comparer
public class EntityComparer<T> : IEqualityComparer<T>, IComparer<T>
where T : BaseEntity
{
public enum AscDesc : short
{
Asc, Desc
}
#region Const
public string PropertyName { get; set; }
public AscDesc SortType { get; set; }
#endregion
#region Ctor
public EntityComparer(string _propertyname = "Id", AscDesc _sorttype = AscDesc.Asc)
{
this.PropertyName = _propertyname;
this.SortType = _sorttype;
}
#endregion
#region IComparer
public int Compare(T x, T y)
{
if (typeof(T).GetProperty(PropertyName) == null)
throw new ArgumentNullException(string.Format("{0} does not contain a property with the name \"{1}\"", typeof(T).Name, PropertyName));
var xValue = (IComparable)x.GetType().GetProperty(this.PropertyName).GetValue(x, null);
var yValue = (IComparable)y.GetType().GetProperty(this.PropertyName).GetValue(y, null);
if (this.SortType == AscDesc.Asc)
return xValue.CompareTo(yValue);
return yValue.CompareTo(xValue);
}
#endregion
#region IEqualityComparer
public bool Equals(T x, T y)
{
if (typeof(T).GetProperty(PropertyName) == null)
throw new InvalidOperationException(string.Format("{0} does not contain a property with the name -> \"{1}\"", typeof(T).Name, PropertyName));
var valuex = x.GetType().GetProperty(PropertyName).GetValue(x, null);
var valuey = y.GetType().GetProperty(PropertyName).GetValue(y, null);
if (valuex == null) return valuey == null;
return valuex.Equals(valuey);
}
public int GetHashCode(T obj)
{
var info = obj.GetType().GetProperty(PropertyName);
object value = null;
if (info != null)
{
value = info.GetValue(obj, null);
}
return value == null ? 0 : value.GetHashCode();
}
#endregion
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace LHDN.CRM.Models {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class FieldName {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal FieldName() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LHDN.CRM.Models.FieldName", typeof(FieldName).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Inbound Caller ID.
/// </summary>
public static string TPCallerID {
get {
return ResourceManager.GetString("TPCallerID", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Inbound Email Kedua MB.
/// </summary>
public static string TPInboundEmailMB {
get {
return ResourceManager.GetString("TPInboundEmailMB", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Inbound No.Telefon Bimbit Baru.
/// </summary>
public static string TPInboundHPNo {
get {
return ResourceManager.GetString("TPInboundHPNo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Outbound Email MB.
/// </summary>
public static string TPOutboundEmailMB {
get {
return ResourceManager.GetString("TPOutboundEmailMB", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Outbound NoTelefon Bimbit Baru.
/// </summary>
public static string TPOutboundHPNo {
get {
return ResourceManager.GetString("TPOutboundHPNo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Outbound No. Tel JPDP.
/// </summary>
public static string TPOutboundTelJPDP {
get {
return ResourceManager.GetString("TPOutboundTelJPDP", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Outbound NoTel Pejabat.
/// </summary>
public static string TPOutboundTelPejabat {
get {
return ResourceManager.GetString("TPOutboundTelPejabat", resourceCulture);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="TPCallerID" xml:space="preserve">
<value>Inbound Caller ID</value>
<comment>Tax Payer's Inbound Caller ID</comment>
</data>
<data name="TPInboundEmailMB" xml:space="preserve">
<value>Inbound Email Kedua MB</value>
<comment>Tax Payer's Inbound Email MB</comment>
</data>
<data name="TPInboundHPNo" xml:space="preserve">
<value>Inbound No.Telefon Bimbit Baru</value>
<comment>Tax Payer's Telefon Bimbit Baru</comment>
</data>
<data name="TPOutboundEmailMB" xml:space="preserve">
<value>Outbound Email MB</value>
<comment>Tax Payer's Outbound Email MB</comment>
</data>
<data name="TPOutboundHPNo" xml:space="preserve">
<value>Outbound NoTelefon Bimbit Baru</value>
<comment>Tax Payer's Outbound Telefon Bimbit Baru</comment>
</data>
<data name="TPOutboundTelJPDP" xml:space="preserve">
<value>Outbound No. Tel JPDP</value>
<comment>Tax Payer's Outbound Telefon JPDP</comment>
</data>
<data name="TPOutboundTelPejabat" xml:space="preserve">
<value>Outbound NoTel Pejabat</value>
<comment>Tax Payer's Outbound Telefon Pejabat</comment>
</data>
</root>
\ No newline at end of file
namespace LHDN.CRM.Models.Migrations
{
using Models;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<LHDN.CRM.Models.Models.CRMContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = true;
}
protected override void Seed(LHDN.CRM.Models.Models.CRMContext context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data.
//Database.SetInitializer(new DropCreateDatabaseIfModelChanges<CRMContext>());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Act_FieldMapping")]
public class ActFieldMapping
{
[Key]
public int FieldMappingID { get; set; }
[Required]
[StringLength(100)]
public string DisplayField { get; set; }
public int FieldType { get; set; }
[Required]
[StringLength(100)]
public string FieldMapping { get; set; }
[StringLength(50)]
public string TableName { get; set; }
[StringLength(50)]
public string FieldMappingRef { get; set; }
[StringLength(50)]
public string FieldMappingRefCode { get; set; }
public bool IsInnerJoin { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Act_Session")]
public class ActSession
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long ActSessionID { get; set; }
[Required]
public Guid SessionKey { get; set; }
[Required]
public long ActivityID { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Activity")]
public class Activity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long ActivityID { get; set; }
[ForeignKey("TaxPayer")]
public long? TPID { get; set; }
[ForeignKey("Case")]
public long? CaseID { get; set; }
public long? OutboundID { get; set; }
public long? HCLEmailBlastID { get; set; }
[Required]
[StringLength(255)]
public string AssignedOfficerLogin { get; set; }
[Required]
[StringLength(255)]
public string AssignedOfficerName { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(255)]
public string AssignedOfficerEmail { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? AssignedDateTime { get; set; }
public bool? IsTransferToCase { get; set; }
public bool? IsOrphanActivity { get; set; }
[StringLength(16)]
public string InteractionID { get; set; }
public int? ActChannelID { get; set; }
public int? SumberID { get; set; }
public int? Kategori1ID { get; set; }
public int? Kategori2ID { get; set; }
public int? Kategori3ID { get; set; }
public int? ActStatusID { get; set; }
[StringLength(255)]
public string Reason { get; set; }
public int? ActStatus1ID { get; set; }
public int? ActStatus2ID { get; set; }
public int? ActStatus3ID { get; set; }
public int? AliranID { get; set; }
public int? LanguageID { get; set; }
[StringLength(30)]
public string Skillset { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? PromiseToPayDate { get; set; }
public int? KodSelesaiID { get; set; }
[StringLength(20)]
public string NoBaucer { get; set; }
public int? TindakanSusulanID { get; set; }
public int? TahunTaksiran { get; set; }
public decimal? NilaiKes { get; set; }
public int? StatusBayaranS104S22ID { get; set; }
public int? TahapID { get; set; }
[StringLength(14)]
public string TelefonInteraksi { get; set; }
public int? JenisPelangganID { get; set; }
public bool? IsPelangganPembayarSama { get; set; }
public long? PelangganTPID { get; set; }
[StringLength(100)]
public string PelangganNama { get; set; }
[StringLength(25)]
public string PelangganNoCukai { get; set; }
[StringLength(14)]
public string PelangganTelefon { get; set; }
[StringLength(100)]
public string PelangganEmail { get; set; }
public int? PelangganIDType { get; set; }
[StringLength(12)]
public string PelangganIDNumber { get; set; }
public int? PelangganOtherIDType { get; set; }
[StringLength(12)]
public string PelangganOtherIDNumber { get; set; }
public int? PelangganLokasiID { get; set; }
[StringLength(255)]
public string PelangganJawatan { get; set; }
[StringLength(100)]
public string TPName { get; set; }
[StringLength(25)]
public string TPNoCukai { get; set; }
public int? TPIDType { get; set; }
[StringLength(12)]
public string TPIDNumber { get; set; }
[StringLength(100)]
public string TPEmail { get; set; }
[StringLength(100)]
public string TPEmailMB { get; set; }
[StringLength(14)]
public string TPTelefon { get; set; }
[StringLength(14)]
public string TPTelefonMB { get; set; }
[StringLength(14)]
public string TPTelefonPejabat { get; set; }
[StringLength(50)]
public string TPFBID { get; set; }
[StringLength(50)]
public string TPFBDisplayName { get; set; }
[StringLength(50)]
public string TPTWID { get; set; }
[StringLength(50)]
public string TPTWDisplayName { get; set; }
public string Transcript { get; set; }
public int? JenisKempenID { get; set; }
public int? JenisCukaiID { get; set; }
public string Description { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? LetterFaxReceived { get; set; }
public int? DocTahunTaksiran { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? DocTarikhDocument { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? DocTarikhTerima { get; set; }
public int? DocKategoriDokumen { get; set; }
public int? DocCawanganTindakanID { get; set; }
public int? DocUnit { get; set; }
public bool? DocTindakanSuratKeluar { get; set; }
public bool? DocTindakanSegera { get; set; }
public bool? DocTindakanTidakPerluTindakan { get; set; }
public bool? DocTindakanCetakSurat { get; set; }
public bool? IsDelete { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[StringLength(255)]
public string CreatedByName { get; set; }
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[StringLength(255)]
public string LastUpdatedByName { get; set; }
[Column(TypeName = "datetime2")]
public DateTime LastUpdatedDateTime { get; set; }
[Column(TypeName = "timestamp")]
[MaxLength(8)]
[Timestamp]
public byte[] ChangeStamp { get; set; }
public int? DMSStatusID { get; set; }
[StringLength(255)]
public string DMSUrl { get; set; }
public short? CallAttempts { get; set; }
public virtual TaxPayer TaxPayer { get; set; }
public virtual Case Case { get; set; }
public bool IsDraft { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_ActChannel")]
public class ActivityChannel
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ActChannelID { get; set; }
[Required]
[StringLength(250)]
public string ActChannelName { get; set; }
[Required]
public bool IsShowVerificationTab { get; set; }
[Required]
public bool IsShowPenerimaanDocTab { get; set; }
[StringLength(500)]
public string DefaultRoles { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Required]
public DateTime CreatedDatetime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Required]
public DateTime LastUpdatedDatetime { get; set; }
public virtual ICollection<Sumber> Sumber { get; set; }
}
}
using System;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("AuditDetail")]
public partial class AuditDetail
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long AuditDetailID { get; set; }
[ForeignKey("AuditMaster")]
public long AuditID { get; set; }
[StringLength(50)]
public string FieldName { get; set; }
public string OldValue { get; set; }
public string NewValue { get; set; }
[Required]
[StringLength(200)]
public string CreatedBy { get; set; }
[Required]
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
public virtual AuditMaster AuditMaster { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("AuditEvent")]
public class AuditEvent
{
[Key]
public int AuditEventID { get; set; }
[Required]
[StringLength(20)]
public string System { get; set; }
[Required]
[StringLength(50)]
public string AuditModule { get; set; }
[Required]
[StringLength(100)]
public string AuditEventName { get; set; }
[Required]
[StringLength(200)]
public string Createdby { get; set; }
[Required]
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(200)]
public string LastUpdatedBy { get; set; }
[Required]
[Column(TypeName = "datetime2")]
public DateTime LastUpdatedDateTime { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("AuditMaster")]
public partial class AuditMaster
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long AuditID { get; set; }
[StringLength(50)]
public string AuditModule { get; set; }
[Required]
public int AuditEventID { get; set; }
[Required]
[StringLength(100)]
public string AuditEventName { get; set; }
[Required]
[StringLength(1)]
[Column(TypeName ="char")]
public string ResultType { get; set; }
[Required]
[StringLength(20)]
public string ActionType { get; set; }
[StringLength(50)]
public string RefTableName { get; set; }
public long? RefTableID { get; set; }
[Required]
[StringLength(2000)]
public string AdditionalInfo { get; set; }
[Required]
[StringLength(255)]
public string UserID { get; set; }
[Required]
[StringLength(200)]
public string CreatedBy { get; set; }
[Required]
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
public virtual ICollection<AuditDetail> AuditDetails { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_CCTemplateName")]
public class CCTemplate
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int CCTemplateNameID { get; set; }
[StringLength(250)]
public string CCTemplateName { get; set; }
[StringLength(50)]
public string CCTemplateCode { get; set; }
[StringLength(1)]
public string CCTemplateType { get; set; }
public bool? IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
public DateTime LastUpdatedDateTime { get; set; }
}
}

using System.Data.Entity;
namespace LHDN.CRM.Models.Models
{
public partial class CRMContext : DbContext
{
public CRMContext() : base("name=LHDN.CRM") { }
public virtual DbSet<AuditDetail> AuditDetails { get; set; }
public virtual DbSet<AuditMaster> AuditMasters { get; set; }
public virtual DbSet<AuditEvent> AuditEvents { get; set; }
public virtual DbSet<ErrorLog> ErrorLogs { get; set; }
public virtual DbSet<PerfLog> PerfLogs { get; set; }
public virtual DbSet<TaxPayer> TaxPayers { get; set; }
public virtual DbSet<Activity> Activity { get; set; }
public virtual DbSet<Case> Case { get; set; }
public virtual DbSet<TindakanSusulan> TindakanSusulan { get; set; }
public virtual DbSet<StatusLevel1> StatusLevel1 { get; set; }
public virtual DbSet<StatusLevel2> StatusLevel2 { get; set; }
public virtual DbSet<StatusLevel3> StatusLevel3 { get; set; }
public virtual DbSet<MainKategori> MainKategori { get; set; }
public virtual DbSet<SubKategori> SubKategori { get; set; }
public virtual DbSet<InnerSubKategori> InnerSubKategori { get; set; }
public virtual DbSet<JenisKempen> JenisKempen { get; set; }
public virtual DbSet<LookupParam> LookupParam { get; set; }
public virtual DbSet<ActivityChannel> ActivityChannel { get; set; }
public virtual DbSet<Sumber> Sumber { get; set; }
public virtual DbSet<DocList> DocList { get; set; }
public virtual DbSet<DocListDetail> DocListDetail { get; set; }
public virtual DbSet<TP_ChangeHistory> TP_ChangeHistorys { get; set; }
//public virtual DbSet<Operators> Operators { get; set; }
//public virtual DbSet<FieldDataType> FieldDataType { get; set; }
//public virtual DbSet<TPFieldMapping> TPFieldMapping { get; set; }
//public virtual DbSet<CaseFieldMapping> CaseFieldMapping { get; set; }
//public virtual DbSet<ActFieldMapping> ActFieldMapping { get; set; }
public virtual DbSet<LookupParamSys> LookupParamSys { get; set; }
public virtual DbSet<ParameterSettings> ParameterSettings { get; set; }
public virtual DbSet<KodSelesai> KodSelesai { get; set; }
public virtual DbSet<FunctionalRoleTask> FunctionalRoleTask { get; set; }
public virtual DbSet<FunctionalRole> FunctionalRole { get; set; }
public virtual DbSet<FunctionalRoleMember> FunctionalRoleMember { get; set; }
public virtual DbSet<UserProfile> UserProfile { get; set; }
public virtual DbSet<Unit> Unit { get; set; }
public virtual DbSet<TPFileType> TPFileType { get; set; }
public virtual DbSet<TPFileTypePrefixCls> TPFileTypePrefix { get; set; }
public virtual DbSet<ActSession> ActSession { get; set; }
//public virtual DbSet<TempAttachment> TempAttachment { get; set; }
public virtual DbSet<Template> Template { get; set; }
public virtual DbSet<CCTemplate> CCTemplate { get; set; }
public virtual DbSet<OutboundCampaign> OutboundCampaign { get; set; }
public virtual DbSet<TPSpouse> TPSpouse { get; set; }
public virtual DbSet<TPShareholder> TPShareholder { get; set; }
public virtual DbSet<TaxAgent> TaxAgent { get; set; }
public virtual DbSet<TPMajikan> TPMajikan { get; set; }
public virtual DbSet<JenisCawangan> JenisCawangan { get; set; }
public virtual DbSet<UnitType> UnitType { get; set; }
public virtual DbSet<Months> Months { get; set; }
public virtual DbSet<ChartAction> ChartAction { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
// Database.SetInitializer<CRMContext>(null);
modelBuilder.Entity<PerfLog>().Property(o => o.Duration).HasPrecision(9, 2);
base.OnModelCreating(modelBuilder);
}
}
}

using System.ComponentModel.DataAnnotations;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class BlacklistRequest
{
/// <summary>
/// Identification No
/// </summary>
[Required]
public string IDNo { get; set; }
/// <summary>
/// Type of Identification <br />
/// 1 NRIC <br />
/// 2 Passport <br />
/// 3 Tentera/Polis <br />
/// 4 OldIC <br />
/// 5 ROC/ROB <br />
/// 6 Facebook ID <br />
/// 7 Twitter ID <br />
/// 8 TaxNo <br />
/// </summary>
[Required]
public int IDType { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 1 Voice <br />
/// 2 Email <br />
/// 3 SMS <br />
/// 4 Chat <br />
/// 5 CFF <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class BlacklistResponse
{
public bool VIP { get; set; }
public bool S104 { get; set; }
public bool S22 { get; set; }
public bool S75A { get; set; }
public bool DebitList { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class DetailedVerification
{
/// <summary>
/// TP Date of Birth
/// </summary>
public DateTime DOB { get; set; }
/// <summary>
/// Registered Add Postcode
/// </summary>
public string PostCode { get; set; }
/// <summary>
/// Last 4 digit account no
/// </summary>
public string AccountNo { get; set; }
/// <summary>
/// Registered Phone No
/// </summary>
public string PhoneNo { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter.Enum
{
//public enum SessionChannel
//{
// Chat, Facebook, Twitter
//}
}
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter.Enum
{
[JsonConverter(typeof(StringEnumConverter))]
public enum LogReportChannel
{
Hotline2, Hotline3, BRIm
}
}
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter.Enum
{
/// <summary>
/// Identification No <br />
/// testn
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum SessionChannel
{
Chat, Facebook, Twitter
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System.ComponentModel.DataAnnotations;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class HotlineRequest
{
//[Required]
//public LogReportChannel VoiceChannel { get; set; }
/// <summary>
/// Identification No
/// </summary>
[Required]
public string IDNo { get; set; }
/// <summary>
/// Type of Identification <br />
/// 1 NRIC <br />
/// 2 Passport <br />
/// 3 Tentera/Polis <br />
/// 4 OldIC <br />
/// 5 ROC/ROB <br />
/// 6 Facebook ID <br />
/// 7 Twitter ID <br />
/// 8 TaxNo <br />
/// </summary>
[Required]
public int IDType { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 1 Voice <br />
/// 2 Email <br />
/// 3 SMS <br />
/// 4 Chat <br />
/// 5 CFF <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class HotlineResponse
{
public string IDNo { get; set; }
public int IDType { get; set; }
public string Name { get; set; }
public string PhoneNo { get; set; }
public string TaxFileNumber { get; set; }
public int LanguageID { get; set; }
public int CaseID { get; set; }
public string TaxFileLocation { get; set; }
}
}
using System.ComponentModel.DataAnnotations;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class LanguageRequest
{
/// <summary>
/// Caller's Phone No
/// </summary>
[Required]
public string PhoneNo { get; set; }
/// <summary>
/// Current Session CC interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 1 Voice <br />
/// 2 Email <br />
/// 3 SMS <br />
/// 4 Chat <br />
/// 5 CFF <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class LanguageResponse
{
public int LanguageID { get; set; }
}
}
using System.ComponentModel.DataAnnotations;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class ServiceVerificationRequest
{
/// <summary>
/// Identification No
/// </summary>
[Required]
public string IDNo { get; set; }
/// <summary>
/// Type of Identification <br />
/// 1 NRIC <br />
/// 2 Passport <br />
/// 3 Tentera/Polis <br />
/// 4 OldIC <br />
/// 5 ROC/ROB <br />
/// 6 Facebook ID <br />
/// 7 Twitter ID <br />
/// 8 TaxNo <br />
/// </summary>
[Required]
public int IDType { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 1 Voice <br />
/// 2 Email <br />
/// 3 SMS <br />
/// 4 Chat <br />
/// 5 CFF <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
public DetailedVerification Detailed { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class ServiceVerificationResponse
{
/// <summary>
/// FB/Twitter: FB ID , Chat: NRIC
/// </summary>
public string IDNo { get; set; }
/// <summary>
/// Type of Identification
/// </summary>
public int IDType { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel
/// </summary>
public int Channel { get; set; }
/// <summary>
/// Display name in FB/TW
/// </summary>
public string SocialName { get; set; }
public DateTime DOB { get; set; }
public string PostCode { get; set; }
public string AccountNo { get; set; }
public string PhoneNo { get; set; }
}
}
using System.ComponentModel.DataAnnotations;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class UpdateLanguageRequest
{
[Required]
public string IDNo { get; set; }
/// <summary>
/// Type of Identification <br />
/// 1 NRIC <br />
/// 2 Passport <br />
/// 3 Tentera/Polis <br />
/// 4 OldIC <br />
/// 5 ROC/ROB <br />
/// 6 Facebook ID <br />
/// 7 Twitter ID <br />
/// 8 TaxNo <br />
/// </summary>
[Required]
public int IDType { get; set; }
/// <summary>
/// LanguageID <br />
/// 0 No Language Preference <br />
/// 1 Bahasa Malaysia <br />
/// 2 Bahasa Inggeris <br />
/// </summary>
[Required]
public int LanguageID { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 1 Voice <br />
/// 2 Email <br />
/// 3 SMS <br />
/// 4 Chat <br />
/// 5 CFF <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class VerifyRequest
{
/// <summary>
/// FB/Twitter: FB ID , Chat: NRIC
/// </summary>
[Required]
public string IDNo { get; set; }
/// <summary>
/// Type of Identification <br />
/// 1 NRIC <br />
/// 2 Passport <br />
/// 3 Tentera/Polis <br />
/// 4 OldIC <br />
/// 5 ROC/ROB <br />
/// 6 Facebook ID <br />
/// 7 Twitter ID <br />
/// 8 TaxNo <br />
/// </summary>
[Required]
public int IDType { get; set; }
/// <summary>
/// Current Session CC Interaction ID
/// </summary>
public string InteractionID { get; set; }
/// <summary>
/// Session Channel <br />
/// 4 Chat <br />
/// 6 Facebook <br />
/// 7 Twitter <br />
/// </summary>
public int Channel { get; set; }
/// <summary>
/// Display name in FB/TW
/// </summary>
public string SocialName { get; set; }
}
}
using LHDN.CRM.Models.Models.CallingCenter.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models.CallingCenter
{
public class VerifyResponse
{
public bool Authenticated { get; set; }
public string Name { get; set; }
public string IDNo { get; set;}
public int IDType { get; set; }
public string FacebookID { get; set; }
public string TwitterID { get; set; }
public string Email { get; set; }
public string PhoneNo { get; set; }
public string TaxNo { get; set; }
public bool TaxAgent { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Case")]
public class Case
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long CaseID { get; set; }
public long TaxPayerID { get; set; }
public string CaseCategory { get; set; }
public virtual ICollection<Activity> Activity { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Case_FieldMapping")]
public class CaseFieldMapping
{
[Key]
public int FieldMappingID { get; set; }
[Required]
[StringLength(100)]
public string DisplayField { get; set; }
public int FieldType { get; set; }
[Required]
[StringLength(100)]
public string FieldMapping { get; set; }
[StringLength(50)]
public string TableName { get; set; }
[StringLength(50)]
public string FieldMappingRef { get; set; }
[StringLength(50)]
public string FieldMappingRefCode { get; set; }
public bool IsInnerJoin { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
[Table("Ref_ChartAction")]
public class ChartAction
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ChartActionID { get; set; }
[Required]
[StringLength(50)]
public string Name { get; set; }
[Required]
[StringLength(100)]
public string SQLKeyword { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace LHDN.CRM.Models.Models
{
[Table("Ref_DocList")]
public class DocList
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int DocListID { get; set; }
public string KategoriDocCode { get; set; }
public string KategoriDocName { get; set; }
public bool IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime LastUpdatedDateTime { get; set; }
public virtual ICollection<DocListDetail> DocListDetail { get; set; }
}
}
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace LHDN.CRM.Models.Models
{
[Table("Ref_DocListDetail")]
public partial class DocListDetail
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int DocListDetailID { get; set; }
public int? DocListID { get; set; }
[StringLength(255)]
public string DocName { get; set; }
[StringLength(10)]
public string DocCode { get; set; }
public bool IsActive { get; set; }
private DocList DocList { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("EmailQueue")]
public class EmailQueue
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long EmailQueueID { get; set; }
public string To { get; set; }
public string CC { get; set; }
[StringLength(255)]
public string Subject { get; set; }
public string Body { get; set; }
public int FailAttempt { get; set; }
[StringLength(200)]
public string CreatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
[StringLength(200)]
public string LastUpdatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime LastUpdatedDateTime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("ErrorLog")]
public class ErrorLog
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long ErrorLogID { get; set; }
[StringLength(20)]
public string System { get; set; }
public string AdditionalInfo { get; set; }
[StringLength(200)]
public string UserID { get; set; }
[StringLength(200)]
public string CreatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_FieldDataTypeMapping")]
public class FieldDataType
{
[Key]
public int DataTypeID { get; set; }
public int LookupSysTypeID { get; set; }
[Required]
[StringLength(50)]
public string DataTypeName { get; set; }
public int OperatorID { get; set; }
public bool IsActive { get; set; }
public virtual ICollection<LookupParam> OperatorName { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("Usr_FunctionalRole")]
public class FunctionalRole
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int FunctionalRoleID { get; set; }
[Required]
[StringLength(255)]
public string RoleName { get; set; }
//[Required]
//public virtual ICollection<FunctionalRoleMember> FunctionalRoleMembers { get; set; }
public virtual ICollection<FunctionalRoleTask> FunctionalRoleTasks { get; set; }
}
}
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Usr_FunctionalRoleMember")]
public class FunctionalRoleMember
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long FunctionalRoleMemberID { get; set; }
public int FunctionalRoleID { get; set; }
public int? UnitID { get; set; }
public long UserProfileID { get; set; }
public virtual ICollection<FunctionalRole> FunctionalRoles { get; set; }
//public virtual ICollection<FunctionalRoleTask> FunctionalRoleTasks { get; set; }
//[ForeignKey("FunctionalRoleID")]
//public virtual ICollection<FunctionalRoleTask> FunctionalRoleTasks { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Usr_FunctionalRoleTask")]
public class FunctionalRoleTask
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int FunctionalRoleTaskID { get; set; }
public int FunctionalTaskID { get; set; }
//[ForeignKey("FunctionalRoleMember")]
public int FunctionalRoleID { get; set; }
// public virtual FunctionalRoleMember FunctionalRoleMember { get; set; }
[ForeignKey("FunctionalTaskID")]
public virtual Ref_FunctionalTask FunctionalTask { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_Kategori3")]
public class InnerSubKategori
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Kategori3ID { get; set; }
[Required]
[StringLength(250)]
public string Kategori3Name { get; set; }
[StringLength(250)]
public string DispositionCode3 { get; set; }
public int Kategori2ID { get; set; }
[ForeignKey("Kategori2ID")]
private SubKategori SubKategori { get; set; }
[Required]
public bool IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Required]
public DateTime CreatedDatetime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Required]
public DateTime LastUpdatedDatetime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_JenisCawangan")]
public class JenisCawangan
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int JenisCawanganID { get; set; }
[StringLength(255)]
public string JenisCawanganName { get; set; }
public bool CheckTPBranch { get; set; }
[StringLength(255)]
public string MappingColumn { get; set; }
public int? BranchUnitID { get; set; }
public bool IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Required]
public DateTime CreatedDatetime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Required]
public DateTime LastUpdatedDatetime { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_JenisKempen")]
public class JenisKempen
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int JenisKempenID { get; set; }
[Required]
[StringLength(250)]
public string JenisKempenName { get; set; }
[Required]
public int JenisKempenKategoriSysID { get; set; }
[StringLength(50)]
public string ReMSTempTableName { get; set; }
[StringLength(50)]
public string ReMSTableName { get; set; }
[StringLength(50)]
public string ReMSMappingTableName { get; set; }
[Required]
public bool IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Required]
public DateTime CreatedDatetime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Required]
public DateTime LastUpdatedDatetime { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
[Table("Ref_KodSelesai")]
public class KodSelesai
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int KodSelesaiID { get; set; }
[StringLength(2)]
public string KodSelesaiCode { get; set; }
[StringLength(250)]
public string KodSelesaiDesc { get; set; }
public bool? IsAgentOption { get; set; }
public bool? IsActive { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
[Column(TypeName = "datetime2")]
public DateTime LastUpdatedDateTime { get; set; }
public int? CCCallResultID { get; set; }
// public virtual ICollection<TindakanSusulan> TindakanSusulan { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_LookupParam")]
public class LookupParam
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int LookupParamID { get; set; }
[StringLength(50)]
public string LookupCode { get; set; }
[StringLength(15)]
public string LookupValue { get; set; }
public string ParamDesc { get; set; }
public bool? IsActive { get; set; }
public bool? IsDefault { get; set; }
public int? SeqNo { get; set; }
[Required]
[StringLength(255)]
public string CreatedBy { get; set; }
public DateTime CreatedDateTime { get; set; }
[Required]
[StringLength(255)]
public string LastUpdatedBy { get; set; }
public DateTime LastUpdatedDateTime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LHDN.CRM.Models.Models
{
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
[Table("Ref_LookupParamSys")]
public class LookupParamSys
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int LookupParamSysID { get; set; }
[StringLength(50)]
public string LookupCode { get; set; }
public string ParamDesc { get; set; }
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment