diff --git a/FrontendWebApi/ApiControllers/LoginController.cs b/FrontendWebApi/ApiControllers/LoginController.cs index b6e8347..8a17ab1 100644 --- a/FrontendWebApi/ApiControllers/LoginController.cs +++ b/FrontendWebApi/ApiControllers/LoginController.cs @@ -56,6 +56,16 @@ namespace FrontendWebApi.ApiControllers { return Ok(System.DateTime.Now.ToString() + " OK !"); + } + + [AllowAnonymous] + [HttpGet("~/hellodb")] + [Consumes("application/x-www-form-urlencoded")] + public async Task>> hellodb() + { + var User = await backendRepository.GetOneAsync("userinfo", @$" deleted = 0"); + return Ok(System.DateTime.Now.ToString() + @$"{User.full_name} OK !"); + } #endregion @@ -89,12 +99,15 @@ namespace FrontendWebApi.ApiControllers apiResult.Msg = "登入成功"; apiResult.Data = jwt.GenerateToken(jwtLoing); } - catch + catch( Exception ex) { + apiResult.Msg = ex.Message; apiResult.Code = "9999"; return BadRequest(apiResult); } return Ok(apiResult); + + } diff --git a/z01_WinAPP/fmKeKe.Designer.cs b/z01_WinAPP/fmKeKe.Designer.cs new file mode 100644 index 0000000..41f3559 --- /dev/null +++ b/z01_WinAPP/fmKeKe.Designer.cs @@ -0,0 +1,103 @@ +namespace z01_WinAPP +{ + partial class fmKeKe + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.button1 = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.button1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.dataGridView1); + this.splitContainer1.Size = new System.Drawing.Size(1378, 890); + this.splitContainer1.SplitterDistance = 131; + this.splitContainer1.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(78, 44); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(94, 29); + this.button1.TabIndex = 0; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // dataGridView1 + // + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(0, 0); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowHeadersWidth = 51; + this.dataGridView1.RowTemplate.Height = 29; + this.dataGridView1.Size = new System.Drawing.Size(1378, 755); + this.dataGridView1.TabIndex = 0; + // + // fmKeKe + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1378, 890); + this.Controls.Add(this.splitContainer1); + this.Name = "fmKeKe"; + this.Text = "fmKeKe"; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView1; + } +} \ No newline at end of file diff --git a/z01_WinAPP/fmKeKe.cs b/z01_WinAPP/fmKeKe.cs new file mode 100644 index 0000000..1a6544e --- /dev/null +++ b/z01_WinAPP/fmKeKe.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace z01_WinAPP +{ + public partial class fmKeKe : Form + { + public fmKeKe() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/z01_WinAPP/fmKeKe.resx b/z01_WinAPP/fmKeKe.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/z01_WinAPP/fmKeKe.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file