예제 #1
0
 public List <AuditModules> GetModulesList()
 {
     using (AuditDataContext Adc = _createContext())
     {
         return(Adc.GetModulesList());
     }
 }
예제 #2
0
 public rsp_GetInitialSettingsResult GetSettings()
 {
     using (AuditDataContext Adc = _createContext())
     {
         return(Adc.GetInitialSettings().SingleOrDefault());
     }
 }
예제 #3
0
 public ISingleResult <Audit_History> GetAuditDetails([Parameter(Name = "FromDate", DbType = "DateTime")] System.Nullable <System.DateTime> fromDate, [Parameter(Name = "ToDate", DbType = "DateTime")] System.Nullable <System.DateTime> toDate, [Parameter(Name = "ModuleID", DbType = "VarChar(50)")] string moduleID)
 {
     using (AuditDataContext Adc = _createContext())
     {
         return(Adc.GetAuditDetails(fromDate, toDate, moduleID));
     }
 }
예제 #4
0
 // required for those apps ( enterprise) which don't use security class
 public int InsertAuditData(Audit_History objAH, bool NoLoginInfo)
 {
     using (AuditDataContext Adc = _createContext())
     {
         return(Adc.InsertAuditData(objAH.Audit_User_ID, objAH.Audit_User_Name, objAH.Audit_Module_ID, objAH.Audit_Module_Name, objAH.Audit_Screen_Name,
                                    objAH.Audit_Slot, objAH.Audit_Field, objAH.Audit_Old_Vl, objAH.Audit_New_Vl, objAH.Audit_Desc, objAH.Audit_Operation_Type));
     }
 }
예제 #5
0
        internal int InsertAuditData_internal(Audit_History objAH)
        {
            using (AuditDataContext Adc = _createContext())
            {
                if (SecurityHelper.CurrentUser != null && SecurityHelper.CurrentUser.SecurityUserID != 0 && SecurityHelper.CurrentUser.UserName != null)
                {
                    objAH.Audit_User_ID   = SecurityHelper.CurrentUser.SecurityUserID;
                    objAH.Audit_User_Name = SecurityHelper.CurrentUser.DisplayName;
                }

                return(Adc.InsertAuditData(objAH.Audit_User_ID, objAH.Audit_User_Name, objAH.Audit_Module_ID, objAH.Audit_Module_Name, objAH.Audit_Screen_Name,
                                           objAH.Audit_Slot, objAH.Audit_Field, objAH.Audit_Old_Vl, objAH.Audit_New_Vl, objAH.Audit_Desc, objAH.Audit_Operation_Type));
            }
        }
예제 #6
0
        public int[] InsertAuditData(Audit_History[] objAH)
        {
            using (AuditDataContext Adc = _createContext())
            {
                int[] nReturnValue = new int[objAH.Length];

                for (int nCount = 0; nCount < objAH.Length; nCount++)
                {
                    objAH[nCount].Audit_User_ID   = SecurityHelper.CurrentUser.SecurityUserID;
                    objAH[nCount].Audit_User_Name = SecurityHelper.CurrentUser.DisplayName;

                    nReturnValue[nCount] = Adc.InsertAuditData(objAH[nCount].Audit_User_ID, objAH[nCount].Audit_User_Name, objAH[nCount].Audit_Module_ID, objAH[nCount].Audit_Module_Name, objAH[nCount].Audit_Screen_Name,
                                                               objAH[nCount].Audit_Slot, objAH[nCount].Audit_Field, objAH[nCount].Audit_Old_Vl, objAH[nCount].Audit_New_Vl, objAH[nCount].Audit_Desc, objAH[nCount].Audit_Operation_Type);
                }
                return(nReturnValue);
            }
        }
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterGeneric(typeof(PaymentsEventModelBatchService <>))
            .AsImplementedInterfaces()
            .SingleInstance();

            builder.RegisterGeneric(typeof(PaymentsEventModelBatchProcessor <>))
            .AsImplementedInterfaces()
            .InstancePerLifetimeScope();

            builder.RegisterType <AuditDataContextFactory>()
            .As <IAuditDataContextFactory>()
            .InstancePerLifetimeScope();

            builder.Register(ctx =>
            {
                var configHelper = ctx.Resolve <IConfigurationHelper>();
                var dbContext    = new AuditDataContext(configHelper.GetConnectionString("PaymentsConnectionString"));
                return(dbContext);
            })
            .As <IAuditDataContext>()
            .InstancePerDependency();
        }