我希望在某些事件之后选择之前选定行的行,我的代码如下所示.
int currentRow = dgvIcbSubsInfo.CurrentCell.RowIndex;
//code to execute
dgvIcbSubsInfo.Rows[currentRow].Selected = true;
Run Code Online (Sandbox Code Playgroud)
执行代码后,预览将如下所示.但我需要>
在id = 1272741(蓝色选择)中获取符号,而不是在1272737中
我正在尝试将.ts编译为.js
我有tsconfig.json
如下
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true,
"outFile": "build/test.js"
},
"exclude": [
"node_modules"
]
}
Run Code Online (Sandbox Code Playgroud)
下面是我的 package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"tsc": "^1.20150623.0",
"typescript": "^2.4.2"
}
}
Run Code Online (Sandbox Code Playgroud)
并且自动生成的内容tasks.json
如下所示
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json", …
Run Code Online (Sandbox Code Playgroud) 我试图使用以下代码在我的Windows窗体应用程序中打印欧元符号.它适用于所有其他字符和符号,但不显示欧元(€).
string input = ((char)128).ToString();
Font f = new System.Drawing.Font("Arial", 12f);
Graphics gr = this.CreateGraphics();
gr.DrawString(input, f, Brushes.Black, new PointF(0, 0));
Run Code Online (Sandbox Code Playgroud)
128 - 是欧元符号的小数可以有人帮忙吗?
尝试使用存储过程将行保存datagridview
到SQL Server
表时出现问题。
这是 C# 代码:
SqlConnection con = new SqlConnection("server= localhost;Database = Vehiculum ;integrated Security = true");
con.Open();
SqlCommand cmd = new SqlCommand("inserproducts", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlConnection con = new SqlConnection("server= localhost;Database = Vehiculum ;integrated Security = true");
con.Open();
SqlCommand cmd = new SqlCommand("insertservisi", con);
cmd.CommandType = CommandType.StoredProcedure;
for (int i = 0; i < dtgservisimi.Rows.Count; i++)
{
cmd.Parameters.AddWithValue("@kategoria", dtgservisimi.Rows[i].Cells[0].Value);
cmd.Parameters.AddWithValue("@servisimi", dtgservisimi.Rows[i].Cells[1].Value);
cmd.Parameters.AddWithValue("@barkodi", dtgservisimi.Rows[i].Cells[2].Value);
cmd.Parameters.AddWithValue("@emertimi", dtgservisimi.Rows[i].Cells[3].Value);
cmd.Parameters.AddWithValue("@sasia", dtgservisimi.Rows[i].Cells[4].Value);
cmd.Parameters.AddWithValue("@garancioni", dtgservisimi.Rows[i].Cells[5].Value);
cmd.Parameters.AddWithValue("@emri", txtemri.Text);
cmd.Parameters.AddWithValue("@mbiemri", txtmbiemri.Text);
cmd.Parameters.AddWithValue("@telefoniI", …
Run Code Online (Sandbox Code Playgroud) c# ×3
.net ×2
datagridview ×1
euro ×1
javascript ×1
json ×1
sql ×1
sql-server ×1
typescript ×1
winforms ×1