示例#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);
 }
示例#2
0
        public IHttpActionResult GetForm(int id)
        {
            string accessType = "SOWIssue_ViewAll";

            if (id > 0)
            {
                ThrowIfUserHasNoRole(accessType);
            }
            using (SOWIssueEntryDataProvider sowIssueEntryDataProvider = new SOWIssueEntryDataProvider(Db, ActiveUser, AccessControl, new SOWIssueQuery(Db)))
            {
                var data = sowIssueEntryDataProvider.Get(id);
                SaveLog("SOWIssue", "GetForm", JsonConvert.SerializeObject(new { primaryKey = id }));
                return(Ok(new SuccessResponse(data)));
            }
        }