Ejemplo n.º 1
0
 public SOWIssueUpdateHandler(GlobalSolusindoDb db, tblM_User user, SOWIssueValidator sowIssueValidator, SOWIssueFactory sowIssueFactory, SOWIssueQuery sowIssueQuery, AccessControl accessControl) : base(db, user)
 {
     this.sowIssueValidator         = sowIssueValidator;
     this.sowIssueFactory           = sowIssueFactory;
     this.sowIssueQuery             = sowIssueQuery;
     this.sowIssueEntryDataProvider = new SOWIssueEntryDataProvider(db, user, accessControl, sowIssueQuery);
 }
Ejemplo n.º 2
0
        public IHttpActionResult Get(int id)
        {
            string accessType = "SOWIssue_ViewAll";

            ThrowIfUserHasNoRole(accessType);
            using (SOWIssueQuery sowIssueQuery = new SOWIssueQuery(Db))
            {
                var data = sowIssueQuery.GetByPrimaryKey(id);
                SaveLog("SOWIssue", "Get", JsonConvert.SerializeObject(new { primaryKey = id }));
                return(Ok(new SuccessResponse(data)));
            }
        }
Ejemplo n.º 3
0
        public IHttpActionResult Search([FromUri] SOWIssueSearchFilter filter)
        {
            string accessType = "SOWIssue_ViewAll";

            ThrowIfUserHasNoRole(accessType);
            if (filter == null)
            {
                throw new KairosException("Missing search filter parameter");
            }

            using (var sowIssueQuery = new SOWIssueQuery(Db))
            {
                var data           = sowIssueQuery.Search(filter);
                var mobileResponse = data.Records.Select(x => new
                {
                    issueId = x.SOWIssue_PK,
                    date    = x.CreatedDate.ToString("dd-MM-yyyy"),
                    content = x.Description,
                    photo   = x.FilePhotoInBase64,
                });
                return(Ok(mobileResponse));
            }
        }
 public SOWIssueEntryDataProvider(GlobalSolusindoDb db, tblM_User user, AccessControl accessControl, SOWIssueQuery sowIssueQuery) : base(db, user)
 {
     this.accessControl = accessControl;
     this.sowIssueQuery = sowIssueQuery;
 }
 public SOWIssueListDataProvider(GlobalSolusindoDb db, tblM_User user, SOWIssueQuery sowIssueQuery) : base(db, user)
 {
     this.sowIssueQuery = sowIssueQuery;
 }