public IssueFeedbackStruct(IssueFeedback feedback) { this.description = feedback.description; this.accessicon = (feedback.accesstype == IssueFeedback.ACCESSTYPE_PUBLIC) ? "" : Images.PRIVATE(); this.name = feedback.createdname; this.date = DateUtils.ConvertToDateString(feedback.createddate); this.time = DateUtils.ConvertToTimeString(feedback.createddate); }
public IssueFeedback CreateModel(Account account) { IssueFeedback model = new IssueFeedback(); model.issueid = this.issueid; model.accesstype = this.accesstype; model.description = this.description; model.createdby = account.id; model.createdname = account.Name; model.createdauthz = account.authz; model.createddate = DateUtils.TimeStamp; return(model); }
public ActionResult CreateIssueFeedback(UIIssueFeedback_C uim) { AjaxStatus status = new AjaxStatus(); using (var context = new DataContext()) { try { Account account = base.GetLoginAccount(); IssueFeedback model = uim.CreateModel(account); IssueFeedbackOperations.TryCreate(account, context, model); context.SaveChanges(); } catch (Exception e) { base.HandleException("CreateIssueFeedback", e); status.SetError(e.Message); } } return(Json(status)); }
public static IssueFeedback TryUpdate(Account requester, DataContext context, IssueFeedback dbentity) { throw new ServerAuthorizeException("Ej tillåtet"); }
public static void TryCreate(Account requester, DataContext context, IssueFeedback feedback) { feedback.Validate(); context.IssueFeedbacks.Add(feedback); }