xxe 2 years ago
parent
commit
47aaaafd09
7 changed files with 133 additions and 99 deletions
  1. +1
    -0
      HKCardManager/Models/UserInfoModel.cs
  2. +107
    -97
      HKCardManager/UserPages/PersonnelEntryPage.Designer.cs
  3. +2
    -0
      HKCardManager/UserPages/PersonnelEntryPage.cs
  4. +3
    -0
      HKCardManager/UserPages/PersonnelEntryPage.resx
  5. +1
    -1
      HKCardManager/options.json
  6. +3
    -0
      HKLib/Dto/UserDto.cs
  7. +16
    -1
      HKLib/Interfaces/HKLibHelper.cs

+ 1
- 0
HKCardManager/Models/UserInfoModel.cs View File

@@ -8,6 +8,7 @@ namespace HKCardManager
{
public class UserInfoModel
{
public string Num { get; set; }
public string UserName { get; set; }

public string State { get; set; }


+ 107
- 97
HKCardManager/UserPages/PersonnelEntryPage.Designer.cs View File

@@ -36,12 +36,6 @@
this.label1 = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.卡状态 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.机构 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.手机号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.卡号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.删除 = new System.Windows.Forms.DataGridViewButtonColumn();
this.button_go = new System.Windows.Forms.Button();
this.textBox_num = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
@@ -49,14 +43,21 @@
this.comboBox_num = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label_count = new System.Windows.Forms.Label();
this.comboBox_page = new System.Windows.Forms.ComboBox();
this.label_first = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label_up = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label_end = new System.Windows.Forms.Label();
this.label_down = new System.Windows.Forms.Label();
this.label_up = new System.Windows.Forms.Label();
this.label_first = new System.Windows.Forms.Label();
this.label_count = new System.Windows.Forms.Label();
this.label_end = new System.Windows.Forms.Label();
this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.名称 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.卡状态 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.机构 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.手机号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.卡号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.删除 = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -157,6 +158,7 @@
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.编号,
this.名称,
this.卡状态,
this.机构,
@@ -172,59 +174,6 @@
this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
//
// 名称
//
this.名称.DataPropertyName = "UserName";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.名称.DefaultCellStyle = dataGridViewCellStyle1;
this.名称.HeaderText = "姓名";
this.名称.Name = "名称";
this.名称.ReadOnly = true;
this.名称.Width = 150;
//
// 卡状态
//
this.卡状态.DataPropertyName = "State";
this.卡状态.HeaderText = "卡状态";
this.卡状态.Name = "卡状态";
this.卡状态.ReadOnly = true;
this.卡状态.Width = 150;
//
// 机构
//
this.机构.DataPropertyName = "OrgName";
this.机构.HeaderText = "机构";
this.机构.Name = "机构";
this.机构.ReadOnly = true;
this.机构.Width = 150;
//
// 手机号
//
this.手机号.DataPropertyName = "Phone";
this.手机号.HeaderText = "手机号";
this.手机号.Name = "手机号";
this.手机号.ReadOnly = true;
this.手机号.Visible = false;
this.手机号.Width = 150;
//
// 卡号
//
this.卡号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.卡号.DataPropertyName = "CardNum";
this.卡号.HeaderText = "卡号";
this.卡号.Name = "卡号";
this.卡号.ReadOnly = true;
//
// 删除
//
this.删除.DataPropertyName = "ContextName";
this.删除.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.删除.HeaderText = "删除";
this.删除.Name = "删除";
this.删除.ReadOnly = true;
this.删除.Text = "删除";
this.删除.UseColumnTextForButtonValue = true;
//
// button_go
//
this.button_go.Location = new System.Drawing.Point(692, 15);
@@ -286,6 +235,15 @@
this.label11.TabIndex = 8;
this.label11.Text = "每页";
//
// label_count
//
this.label_count.AutoSize = true;
this.label_count.Location = new System.Drawing.Point(7, 18);
this.label_count.Name = "label_count";
this.label_count.Size = new System.Drawing.Size(105, 17);
this.label_count.TabIndex = 0;
this.label_count.Text = "总0000条/0000页";
//
// comboBox_page
//
this.comboBox_page.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -295,6 +253,15 @@
this.comboBox_page.Size = new System.Drawing.Size(61, 25);
this.comboBox_page.TabIndex = 7;
//
// label_first
//
this.label_first.AutoSize = true;
this.label_first.Location = new System.Drawing.Point(118, 18);
this.label_first.Name = "label_first";
this.label_first.Size = new System.Drawing.Size(32, 17);
this.label_first.TabIndex = 1;
this.label_first.Text = "首页";
//
// label9
//
this.label9.AutoSize = true;
@@ -304,6 +271,15 @@
this.label9.TabIndex = 6;
this.label9.Text = "页";
//
// label_up
//
this.label_up.AutoSize = true;
this.label_up.Location = new System.Drawing.Point(157, 18);
this.label_up.Name = "label_up";
this.label_up.Size = new System.Drawing.Size(44, 17);
this.label_up.TabIndex = 2;
this.label_up.Text = "上一页";
//
// label8
//
this.label8.AutoSize = true;
@@ -313,6 +289,15 @@
this.label8.TabIndex = 5;
this.label8.Text = "第";
//
// label_down
//
this.label_down.AutoSize = true;
this.label_down.Location = new System.Drawing.Point(208, 18);
this.label_down.Name = "label_down";
this.label_down.Size = new System.Drawing.Size(44, 17);
this.label_down.TabIndex = 3;
this.label_down.Text = "下一页";
//
// label_end
//
this.label_end.AutoSize = true;
@@ -322,41 +307,65 @@
this.label_end.TabIndex = 4;
this.label_end.Text = "尾页";
//
// label_down
// 编号
//
this.label_down.AutoSize = true;
this.label_down.Location = new System.Drawing.Point(208, 18);
this.label_down.Name = "label_down";
this.label_down.Size = new System.Drawing.Size(44, 17);
this.label_down.TabIndex = 3;
this.label_down.Text = "下一页";
this.编号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.编号.DataPropertyName = "Num";
this.编号.HeaderText = "编号";
this.编号.Name = "编号";
//
// label_up
// 名称
//
this.label_up.AutoSize = true;
this.label_up.Location = new System.Drawing.Point(157, 18);
this.label_up.Name = "label_up";
this.label_up.Size = new System.Drawing.Size(44, 17);
this.label_up.TabIndex = 2;
this.label_up.Text = "上一页";
this.名称.DataPropertyName = "UserName";
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.名称.DefaultCellStyle = dataGridViewCellStyle1;
this.名称.HeaderText = "姓名";
this.名称.Name = "名称";
this.名称.ReadOnly = true;
this.名称.Width = 150;
//
// label_first
// 卡状态
//
this.label_first.AutoSize = true;
this.label_first.Location = new System.Drawing.Point(118, 18);
this.label_first.Name = "label_first";
this.label_first.Size = new System.Drawing.Size(32, 17);
this.label_first.TabIndex = 1;
this.label_first.Text = "首页";
this.卡状态.DataPropertyName = "State";
this.卡状态.HeaderText = "卡状态";
this.卡状态.Name = "卡状态";
this.卡状态.ReadOnly = true;
this.卡状态.Width = 150;
//
// label_count
// 机构
//
this.label_count.AutoSize = true;
this.label_count.Location = new System.Drawing.Point(7, 18);
this.label_count.Name = "label_count";
this.label_count.Size = new System.Drawing.Size(105, 17);
this.label_count.TabIndex = 0;
this.label_count.Text = "总0000条/0000页";
this.机构.DataPropertyName = "OrgName";
this.机构.HeaderText = "机构";
this.机构.Name = "机构";
this.机构.ReadOnly = true;
this.机构.Width = 150;
//
// 手机号
//
this.手机号.DataPropertyName = "Phone";
this.手机号.HeaderText = "手机号";
this.手机号.Name = "手机号";
this.手机号.ReadOnly = true;
this.手机号.Visible = false;
this.手机号.Width = 150;
//
// 卡号
//
this.卡号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.卡号.DataPropertyName = "CardNum";
this.卡号.HeaderText = "卡号";
this.卡号.Name = "卡号";
this.卡号.ReadOnly = true;
//
// 删除
//
this.删除.DataPropertyName = "ContextName";
this.删除.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.删除.HeaderText = "删除";
this.删除.Name = "删除";
this.删除.ReadOnly = true;
this.删除.Text = "删除";
this.删除.UseColumnTextForButtonValue = true;
//
// PersonnelEntryPage
//
@@ -384,12 +393,6 @@
private Label label1;
private SplitContainer splitContainer1;
private DataGridView dataGridView1;
private DataGridViewTextBoxColumn 名称;
private DataGridViewTextBoxColumn 卡状态;
private DataGridViewTextBoxColumn 机构;
private DataGridViewTextBoxColumn 手机号;
private DataGridViewTextBoxColumn 卡号;
private DataGridViewButtonColumn 删除;
private Label label_count;
private Button button_go;
private TextBox textBox_num;
@@ -405,5 +408,12 @@
private Label label_down;
private Label label_up;
private Label label_first;
private DataGridViewTextBoxColumn 编号;
private DataGridViewTextBoxColumn 名称;
private DataGridViewTextBoxColumn 卡状态;
private DataGridViewTextBoxColumn 机构;
private DataGridViewTextBoxColumn 手机号;
private DataGridViewTextBoxColumn 卡号;
private DataGridViewButtonColumn 删除;
}
}

+ 2
- 0
HKCardManager/UserPages/PersonnelEntryPage.cs View File

@@ -68,6 +68,7 @@ namespace HKCardManager.UserPages
}
Global.UserListDtos.Add(new UserInfoModel()
{
Num=item.Num,
UserName = item.Name,
Phone = item.Phone,
OrgName = item.OrgInfo?.Count > 0 ? item.OrgInfo.ElementAt(0).Name : "",
@@ -138,6 +139,7 @@ namespace HKCardManager.UserPages
//}
UserDto userDto = new UserDto()
{
Num = await HKLibHelper.GetUserMaxNum(),
Name = textBox1.Text.Trim(),
//Phone = textBox2.Text.Trim(),
OrgId = Global.OrgTables.FirstOrDefault(p => p.Name == comboBox2.Text)?.SId


+ 3
- 0
HKCardManager/UserPages/PersonnelEntryPage.resx View File

@@ -57,6 +57,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="编号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>


+ 1
- 1
HKCardManager/options.json View File

@@ -1,6 +1,6 @@
{
//此配置为测试环境配置
"SaasRoute": "https://bpa.black-pa.com:21528/kitchen/",
"SaasRoute":"http://192.168.1.43:5000/", //"https://bpa.black-pa.com:21528/kitchen/",
//加盟商Id
"TenantId": "78d635f7-8ee4-4be4-b26a-462016196826",
//测试环境广告地址


+ 3
- 0
HKLib/Dto/UserDto.cs View File

@@ -7,6 +7,7 @@ namespace HKLib.Dto
{
public class UserDto
{
public String Num { get; set; }
/// <summary>
/// 机构
/// </summary>
@@ -26,6 +27,8 @@ namespace HKLib.Dto
}
public class UserListDto
{
[JsonProperty("num")]
public string Num { get; set; }
[JsonProperty("realName")]
public string Name { get; set; }
/// <summary>


+ 16
- 1
HKLib/Interfaces/HKLibHelper.cs View File

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using XExten.Advance.HttpFramework.MultiCommon;
using XExten.Advance.HttpFramework.MultiFactory;
using XExten.Advance.LinqFramework;
using static RabbitMQ.Client.Logging.RabbitMqClientEventSource;

namespace HKLib.Interfaces
{
@@ -133,6 +134,20 @@ namespace HKLib.Interfaces
return data.ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool();
}

public static async Task<string> GetUserMaxNum()
{
var data = await IHttpMultiClient.HttpMulti.AddHeader(t => t.Headers = Header).AddNode(t =>
{
t.NodePath = $"{Configer.SaasRoute}api/one-card/max-num";
t.ReqType = MultiType.GET;
}).Build().RunStringFirstAsync();
var str = data.ToModel<JObject>()["data"]["data"].ToString();
var check = str.IsNullOrEmpty();
if (check) return "0001";
return (str.AsInt() + 1).ToString().PadLeft(4, '0');
}


/// <summary>
/// 根据用户命获取下拉用户列表
/// </summary>
@@ -190,7 +205,7 @@ namespace HKLib.Interfaces
{
t.NodePath = $"{Configer.SaasRoute}api/one-card/staff";
t.ReqType = MultiType.POST;
t.JsonParam = (new { tagId = input.OrgId, realName = input.Name, phone = input.Phone }).ToJson();
t.JsonParam = (new { tagId = input.OrgId, realName = input.Name, phone = input.Phone,num=input.Num }).ToJson();
}).Build().RunStringFirstAsync();
return data.ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool();
}


Loading…
Cancel
Save