Beispiel #1
0
        public BaseResponse Add(List <InserLogRequest> publishers)
        {
            BaseResponse baseResponse = new BaseResponse();

            try
            {
                /*InserLogRequest
                 * public string ProjectCode { get; set; }
                 * public string Password { get; set; }
                 * public string queuName { get; set; }
                 * public string LoginInfoMessage { get; set; }
                 * public string Email { get; set; }
                 * public bool IsEmailRequired { get; set; }
                 */

                foreach (InserLogRequest item in publishers)
                {
                    int projectID = _projectInfoService.GetIdByCode(item.ProjectCode);
                    _logInfoService.Add(new LogInfo
                    {
                        ProjectID      = projectID,
                        insertDateTime = DateTime.Now,
                        LogInfoMessage = item.LoginInfoMessage
                    });
                }
                baseResponse.SetStatus(ResponseCode.SUCCESS);
                return(baseResponse);
            }
            catch (Exception)
            {
                throw;
            }
            return(null);
        }