This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string StringCsvToJson() | |
{ | |
var text = "\"ExecuteStatus\",\"ExecuteTime\",\"ExecuteMessege\",\"ExecuteEntityID\",\"Comment\",\"Disabled\",\"Hello\",\"ExecuteDetails\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"yuiop\",\"cvbnm\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"yuiop\",\"cvbnm\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"yuiop\",\"cvbnm\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"yuiop\",\"cvbnm\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"qwerty\",\"zxcvbn\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"yuiop\",\"cvbnm\",\"parameter\",\"\"\r\n\"0\",\"\",\"\",\"\",\"summ test\",\"summ test\",\"parameter\",\"\"\r\n"; | |
using var sr = new StringReade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 0, | |
"title": "Return_To_WS", | |
"content": [ | |
{ | |
"Key": "ExecuteStatus", | |
"Value": "0" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSummaryReportSchema(transactionid) { | |
transactionService.getSummaryReportSchema(transactionid, orgName) | |
.then((result) => { | |
log(JSON.stringify(result)) | |
result.forEach(element => { | |
let values = element.Values; | |
vm.masterDetailResults.push(values); | |
vm.tabs.push({ | |
title: element.TaskName | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
<script src="https://unpkg.com/axios@0.19.2/dist/axios.min.js"></script> | |
<title>Document</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal async Task PostPhotoAsync(Photo instance) | |
{ | |
try | |
{ | |
var getById = _parser.GetById(); | |
var descrs = _parser.GetDescription(); | |
for (var i = 0; i < getById.Count && i < descrs.Count; i++) | |
{ | |
string photo = getById[i]; | |
var descr = descrs[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static PostData UpdatePostData(MyContext context, int messageId, bool isLiked) | |
{ | |
var post = context.Posts | |
.FirstOrDefault(x => x.MessageId == messageId); | |
if (isLiked) | |
{ | |
var likesCount = context.Posts | |
.Where(x => x.MessageId == messageId) | |
.Select(x => x.Likes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class MyContext : DbContext | |
{ | |
public DbSet<PostData> Posts { get; set; } | |
public DbSet<VoteData> Votes { get; set; } | |
public MyContext(DbContextOptions<MyContext> options) : base(options) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static PostData UpdatePostData(SQLiteConnection conn, int messageId, bool isLiked) | |
{ | |
PostData postData; | |
if (isLiked) | |
{ | |
conn.Open(); | |
var likesCount = conn.ExecuteReader("SELECT (Likes) FROM PostData AS pd WHERE pd.MessageId = @MessageId", new { messageId }).Parse<int>().FirstOrDefault(); | |
conn.Close(); | |
var temp = 1; | |
if (likesCount > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDbContext : DbContext | |
{ | |
public DbSet<Car> Cars { get; set; } | |
public DbSet<Customer> Customers { get; set; } | |
public DbSet<CarMark> CarsMarks { get; set; } | |
public MyDbContext() | |
{ | |
Database.EnsureCreated(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static PostData UpdatePostData(SQLiteConnection conn, int messageId, bool isLiked) | |
{ | |
PostData postData; | |
if (isLiked) | |
{ | |
var likesCount = conn.ExecuteReader("SELECT (Likes) FROM PostData AS pd WHERE pd.MessageId = @MessageId", new { messageId }).Parse<int>().FirstOrDefault(); | |
var temp = 1; | |
if (likesCount > 0) | |
{ | |
temp = likesCount++; |