public void SetStatus(EnumTableSyncStatus status) { string sql = $"update SyncStatus set Status='{status}' where SyncTable='{TableName}' and CompanyId={CompanyId}"; MobileCommon.ExecuteNonQuery(sql); SyncInfo.Status = status; }
public static string GetText(EnumTableSyncStatus status) { if (status == EnumTableSyncStatus.ReadyToSync) { return("Ready To Sync"); } else if (status == EnumTableSyncStatus.Receiving) { return("Receiving Data"); } else if (status == EnumTableSyncStatus.CompleteReceive) { return("Data Received"); } else if (status == EnumTableSyncStatus.ErrorInReceive) { return("Error In Receiving"); } else if (status == EnumTableSyncStatus.Sending) { return("Sending"); } else if (status == EnumTableSyncStatus.CompleteSend) { return("Data Sent"); } else if (status == EnumTableSyncStatus.ErrorInSend) { return("Error In Sending"); } return("????"); }
public SyncStatus(DataRow row) { Id = (int)row["Id"]; CompanyId = ConvertEx.ToNullable <int>(row["CompanyId"]); SyncTable = (string)row["SyncTable"]; SyncName = (string)row["SyncName"]; DisplayName = (string)row["DisplayName"]; DoSync = (bool)row["DoSync"]; SyncType = ConvertEx.StringToEnum <EnumSyncType>(row["SyncType"]); Status = ConvertEx.StringToEnum <EnumTableSyncStatus>(row["Status"]); }
private void System_SyncChangeStatus(object sender, EnumTableSyncStatus status) { for (int i = 0; i < gvSystem.RowCount; i++) { int handle = gvSystem.GetRowHandle(i); DataRow row = gvSystem.GetDataRow(handle); if ((int)row[ColName.Id] == ((SystemSync)sender).SyncInfo.Id) { row[ColName.Status] = EnumTableSyncStatusText.GetText(status); break; } } }
public void UpdateStatus(EnumTableSyncStatus status) { SyncChangeStatus?.Invoke(this, status); SetStatus(status); }
public void UpdateStatus(EnumTableSyncStatus status) { SyncChangeStatus?.Invoke(this, status); SyncInfo.Status = status; }