public virtual string GetStringStatus(ActivityStatus status) { if (status == ActivityStatus.Scheduled) { return("agendada"); } if (status == ActivityStatus.InProgress) { return("em andamento"); } if (status == ActivityStatus.Done) { return("concluída"); } if (status == ActivityStatus.Reported) { return("reportada como problema"); } if (status == ActivityStatus.Canceled) { return("cancelada"); } throw new ActivityConverterException(status.ToString()); }
public static string ToString(this ActivityStatus status, ActivityKind kind) { if (status == ActivityStatus.Closed && kind.CanBeStarted()) { return("Started"); } return(status.ToString()); }
private void CheckStatus(ActivityStatus status, ProcedureStep o) { Assert.AreEqual(status, o.State, string.Format("Exptected {0} status {1}", o.GetClass().Name, status.ToString())); }
private void clientChangeStat(ActivityStatus stat) { try { var rows = disp_grid_client.SelectedRows; foreach (DataGridViewRow r in rows) { DataGridViewCellCollection c = r.Cells; int clientId = int.Parse(c["col_clientId"].Value.ToString()); RecordsDataSet.ClientRow client = db.Client.FindByid(clientId); client.clientStatus = stat.ToString(); } dbmgr.UpdateAll(db); fillClientGrid(); showSuccessMessage("Updated " + rows.Count + " item(s)"); } catch (Exception ex) { db.RejectChanges(); showErrorMessage("An Error Occured.\n\nDetails:\n" + ex.Message); } }