Beispiel #1
0
        protected override List <ExpenseAccountDetailListDTO> ResolveCore(ExpenseAccountListDTO source)
        {
            IExpenseAccountDetailRepo expenseAccountDetailRepo = new ExpenseAccountDetailRepo(new DatabaseFactory());

            if (source.SearchCompanyId.HasValue)
            {
                return(expenseAccountDetailRepo.GetListDtoByExpenseAccountId(source.Id, source.SearchCompanyId.Value.ToString(), ViewHelp.GetUserName()));
            }
            else
            {
                return(expenseAccountDetailRepo.GetListDtoByExpenseAccountId(source.Id, ViewHelp.GetDetailCompanyIds(), ViewHelp.GetUserName()));
            }
        }
Beispiel #2
0
        public static void Log(object enetity, string ActionName, string ControlName, string Remark = "")
        {
            var Json = JsonConvert.SerializeObject(enetity);

            DapperHelper.SqlExecute(@"INSERT INTO EM_System_ActionLog
           (TableName
           ,ControlName
           ,ActionName
           ,Json
           ,UserName
           ,Remark
           ,CreateDate)
     VALUES
           (@TableName
           ,@ControlName
           ,@ActionName
           ,@Json
           ,@UserName
           ,@Remark
           ,@CreateDate)", new { TableName = enetity.GetType().Name, Json = Json, ActionName = ActionName, ControlName = ControlName, Remark = Remark, UserName = ViewHelp.GetUserName(), CreateDate = DateTime.Now });
        }