xxe 2 år sedan
förälder
incheckning
7dade09a4a
6 ändrade filer med 289 tillägg och 130 borttagningar
  1. +12
    -4
      HKCardManager/Form1.cs
  2. +31
    -6
      HKCardManager/UserPages/CancellationPage.cs
  3. +15
    -8
      HKCardManager/UserPages/CarMangerPage.cs
  4. +167
    -90
      HKCardManager/UserPages/ReportFormPage.Designer.cs
  5. +58
    -20
      HKCardManager/UserPages/ReportFormPage.cs
  6. +6
    -2
      HKLib/Interfaces/HKLibHelper.cs

+ 12
- 4
HKCardManager/Form1.cs Visa fil

@@ -5,7 +5,6 @@ using HKLib.SQLHelper;
using System.Text.RegularExpressions;
using HKHelper;
using UHFHelper;
using UHFHelper;

namespace HKCardManager
{
@@ -299,20 +298,29 @@ namespace HKCardManager

private void button13_Click(object sender, EventArgs e)
{



if (UHFCardHelper.GetInstance().ComOpen)
{
try
{
var res = UHFCardHelper.GetInstance().ReadCard();

if (string.IsNullOrEmpty(res))
{
MessageBox.Show("提示!!!\n 请放入卡片,在选择销卡...");
MessageLogNotify.GetInstance.Show("请放入卡片");
return;
}
var res1 = UHFCardHelper.GetInstance().WriteCard("000");
MessageBox.Show(res1.Res ? "销卡成功" : "销卡失败");

var resz = MessageBox.Show($"提示!!!\n 当前卡号{res},确定销卡?", "提示", MessageBoxButtons.YesNo);
if (resz == DialogResult.Yes)
{
var res1 = UHFCardHelper.GetInstance().WriteCard("000");
MessageBox.Show(res1.Res ? "销卡成功" : "销卡失败");
}
}
catch (Exception)
{


+ 31
- 6
HKCardManager/UserPages/CancellationPage.cs Visa fil

@@ -21,11 +21,30 @@ namespace HKCardManager.UserPages
//this.SizeChanged += CancellationPage_SizeChanged;
}

//private void CancellationPage_SizeChanged(object? sender, EventArgs e)
//{
// panel1.Left = (this.Width - panel1.Width) / 2;
// panel1.Top = (this.Height - panel1.Height) / 2;
//}
private void Ref()
{
var res = HKLibHelper.GetUserListSync("");
Global.UserListDtos.Clear();
res?.ToList()?.ForEach(item =>
{
string status = "";
string cardNum = "";
if (item.Cards != null && item.Cards.Count > 0)
{
cardNum = item.Cards.ElementAt(0).CardNum;
status = ((CarStatus)item.Cards.ElementAt(0).State).ToString();
}
Global.UserListDtos.Add(new UserInfoModel()
{
Num = item.Num,
UserName = item.Name,
Phone = item.Phone,
OrgName = item.OrgInfo?.Count > 0 ? item.OrgInfo.ElementAt(0).Name : "",
CardNum = cardNum,
State = status
});
});
}

private async void button2_Click(object sender, EventArgs e)
{
@@ -53,10 +72,16 @@ namespace HKCardManager.UserPages
//{
//this.Invoke(() => { button2.Enabled = false; });
button2.Enabled = false;
Ref();
var temp = Global.UserListDtos.FirstOrDefault(p => p.UserName == name);
if (temp != null)
{
if (status==3&& temp.State== "挂失")
{
MessageBox.Show($"用户【{temp.UserName}】挂失状态不能销户");
return;
}

if (!string.IsNullOrEmpty(temp.CardNum))
{
var res = await HKLibHelper.CardStutasChange(new CardStutasDto()


+ 15
- 8
HKCardManager/UserPages/CarMangerPage.cs Visa fil

@@ -205,7 +205,8 @@ namespace HKCardManager.UserPages
{
Name = Name,
OrgId = orgTables.FirstOrDefault(p => p.Name == comboBox1.Text)?.SId,
CardNo = worker
CardNo = worker,
Num= HKLibHelper.GetUserMaxNumSync()
};
//Task.Factory.StartNew(() =>
//{
@@ -293,12 +294,6 @@ namespace HKCardManager.UserPages
{
if (UHFCardHelper.GetInstance().ComOpen)
{
if (FirstUser == null)
{
MessageBox.Show("提示!!!\n 没有可以制卡的成员...");
MessageLogNotify.GetInstance.ShowWarning("没有可以制卡的成员!");
return;
}
var res = UHFCardHelper.GetInstance().ReadCard();
if (string.IsNullOrEmpty(res))
{
@@ -306,6 +301,18 @@ namespace HKCardManager.UserPages
MessageLogNotify.GetInstance.Show("请放入卡片");
return;
}
if (res.Equals("000"))
{
MessageBox.Show("提示!!!\n 这是一张新卡...");
}

if (FirstUser == null)
{
MessageBox.Show("提示!!!\n 没有可以制卡的成员...");
MessageLogNotify.GetInstance.ShowWarning("没有可以制卡的成员!");
return;
}

if (Regex.IsMatch(res, "\\d{19}"))
{
var result = await HKLibHelper.GetUserList("");
@@ -348,7 +355,7 @@ namespace HKCardManager.UserPages
{
Name = Name,
OrgId = orgTables.FirstOrDefault(p => p.Name == FirstUser.OrgName)?.SId,
CardNo = worker
CardNo = worker,
};
var res = UHFCardHelper.GetInstance().WriteCard(userDto.CardNo);
if (res.Res == false)


+ 167
- 90
HKCardManager/UserPages/ReportFormPage.Designer.cs Visa fil

@@ -29,13 +29,6 @@
private void InitializeComponent()
{
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.label4 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label3 = new System.Windows.Forms.Label();
this.姓名 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.手机 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.时间 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -48,11 +41,25 @@
this.晚上消费金额 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.总计消费次数 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.金额总计 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.label4 = new System.Windows.Forms.Label();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label3 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
@@ -73,94 +80,13 @@
this.总计消费次数,
this.金额总计});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Location = new System.Drawing.Point(3, 3);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowTemplate.Height = 25;
this.dataGridView1.Size = new System.Drawing.Size(875, 513);
this.dataGridView1.Size = new System.Drawing.Size(869, 430);
this.dataGridView1.TabIndex = 2;
//
// 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.button2);
this.splitContainer1.Panel1.Controls.Add(this.button1);
this.splitContainer1.Panel1.Controls.Add(this.dateTimePicker2);
this.splitContainer1.Panel1.Controls.Add(this.label4);
this.splitContainer1.Panel1.Controls.Add(this.dateTimePicker1);
this.splitContainer1.Panel1.Controls.Add(this.label3);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.dataGridView1);
this.splitContainer1.Size = new System.Drawing.Size(875, 557);
this.splitContainer1.SplitterDistance = 40;
this.splitContainer1.TabIndex = 3;
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.button2.Location = new System.Drawing.Point(735, 6);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(88, 30);
this.button2.TabIndex = 12;
this.button2.Text = "导出";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.button1.Location = new System.Drawing.Point(629, 6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 30);
this.button1.TabIndex = 11;
this.button1.Text = "查询";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dateTimePicker2
//
this.dateTimePicker2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dateTimePicker2.Location = new System.Drawing.Point(389, 6);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(200, 28);
this.dateTimePicker2.TabIndex = 9;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label4.Location = new System.Drawing.Point(312, 10);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(90, 21);
this.label4.TabIndex = 8;
this.label4.Text = "结束时间:";
//
// dateTimePicker1
//
this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dateTimePicker1.Location = new System.Drawing.Point(80, 6);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(200, 28);
this.dateTimePicker1.TabIndex = 7;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label3.Location = new System.Drawing.Point(3, 10);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(90, 21);
this.label3.TabIndex = 6;
this.label3.Text = "开始时间:";
//
// 姓名
//
this.姓名.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
@@ -254,6 +180,149 @@
this.金额总计.HeaderText = "金额总计";
this.金额总计.Name = "金额总计";
//
// 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.button2);
this.splitContainer1.Panel1.Controls.Add(this.button1);
this.splitContainer1.Panel1.Controls.Add(this.dateTimePicker2);
this.splitContainer1.Panel1.Controls.Add(this.label4);
this.splitContainer1.Panel1.Controls.Add(this.dateTimePicker1);
this.splitContainer1.Panel1.Controls.Add(this.label3);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tableLayoutPanel1);
this.splitContainer1.Size = new System.Drawing.Size(875, 557);
this.splitContainer1.SplitterDistance = 40;
this.splitContainer1.TabIndex = 3;
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.button2.Location = new System.Drawing.Point(735, 6);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(88, 30);
this.button2.TabIndex = 12;
this.button2.Text = "导出";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.button1.Location = new System.Drawing.Point(629, 6);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 30);
this.button1.TabIndex = 11;
this.button1.Text = "查询";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dateTimePicker2
//
this.dateTimePicker2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dateTimePicker2.Location = new System.Drawing.Point(389, 6);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(200, 28);
this.dateTimePicker2.TabIndex = 9;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label4.Location = new System.Drawing.Point(312, 10);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(90, 21);
this.label4.TabIndex = 8;
this.label4.Text = "结束时间:";
//
// dateTimePicker1
//
this.dateTimePicker1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dateTimePicker1.Location = new System.Drawing.Point(80, 6);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(200, 28);
this.dateTimePicker1.TabIndex = 7;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label3.Location = new System.Drawing.Point(3, 10);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(90, 21);
this.label3.TabIndex = 6;
this.label3.Text = "开始时间:";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 91.02296F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.977036F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(875, 479);
this.tableLayoutPanel1.TabIndex = 3;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 294F));
this.tableLayoutPanel2.Controls.Add(this.button3, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.button4, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 439);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(869, 37);
this.tableLayoutPanel2.TabIndex = 3;
//
// button3
//
this.button3.Dock = System.Windows.Forms.DockStyle.Fill;
this.button3.Location = new System.Drawing.Point(3, 3);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(281, 31);
this.button3.TabIndex = 0;
this.button3.Text = "上一页";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Dock = System.Windows.Forms.DockStyle.Fill;
this.button4.Location = new System.Drawing.Point(577, 3);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(289, 31);
this.button4.TabIndex = 1;
this.button4.Text = "下一页";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(430, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 17);
this.label1.TabIndex = 2;
//
// ReportFormPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
@@ -267,6 +336,9 @@
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.ResumeLayout(false);

}
@@ -292,5 +364,10 @@
private DataGridViewTextBoxColumn 晚上消费金额;
private DataGridViewTextBoxColumn 总计消费次数;
private DataGridViewTextBoxColumn 金额总计;
private TableLayoutPanel tableLayoutPanel1;
private TableLayoutPanel tableLayoutPanel2;
private Button button3;
private Button button4;
private Label label1;
}
}

+ 58
- 20
HKCardManager/UserPages/ReportFormPage.cs Visa fil

@@ -16,15 +16,23 @@ namespace HKCardManager.UserPages
{
public partial class ReportFormPage : UserControl
{
private int PageSize = 10;
private int Total;
private int PageIndex;
private double TotalPage;
public ReportFormPage()
{
InitializeComponent();
dataGridView1.AutoGenerateColumns = false;
button2.Enabled = false;
DataGridViewInit();

PageIndex = 1;
TotalPage = 0;
Total = 0;
this.button3.Enabled = false;
}


private void DataGridViewInit()
{
dataGridView1.AllowUserToResizeRows = false;
@@ -106,7 +114,6 @@ namespace HKCardManager.UserPages
}
}
List<ReportCountDto> reportCountDtos = new List<ReportCountDto>();

//查询
private async void button1_Click(object sender, EventArgs e)
{
@@ -115,28 +122,28 @@ namespace HKCardManager.UserPages
if (TagName == "月餐段消费表") type = 2;
else if (TagName == "记次就餐天消费表") type = 1;
else if (TagName == "月餐段汇总表") type = 3;
//Task.Factory.StartNew(() =>
//{

this.Invoke(() => { button1.Enabled = false; });
var res = await HKLibHelper.Report(new ReportDto() { StartTime = dateTimePicker1.Value, EndTime = dateTimePicker2.Value }, type);
var price = SqlLogic.GetPrice();

foreach (var item in res)
{

item.AM = price == null ? 0 : price.AM * item.AMCount;
item.PM = item.PMCount >= 20 ? 75 : price == null ? 0 : price.PM * item.PMCount;
item.AT = price == null ? 0 : price.AT * item.ATCount;
item.Total = item.AM + item.PM + item.AT;
}
reportCountDtos = res;
Total = res.Count;
TotalPage = Math.Ceiling(Total * 1.0 / PageSize);
res = res.Skip(0).Take(PageSize).ToList();
label1.Text = $"{PageIndex}/{TotalPage}";
if (res != null)
{
if (res.Count > 0)
{
reportCountDtos = res;

var price = SqlLogic.GetPrice();

foreach (var item in reportCountDtos)
{

item.AM = price == null ? 0 : price.AM * item.AMCount;
item.PM = item.PMCount >= 20 ? 75 : price == null ? 0 : price.PM * item.PMCount;
item.AT = price == null ? 0 : price.AT * item.ATCount;
item.Total = item.AM + item.PM + item.AT;
}



this.Invoke(() =>
{
@@ -161,7 +168,7 @@ namespace HKCardManager.UserPages
dataGridView1.Columns[2].Visible = false;
dataGridView1.Columns[3].Visible = true;
}
dataGridView1.DataSource = reportCountDtos;
dataGridView1.DataSource = res;
button2.Enabled = true;
});
MessageLogNotify.GetInstance.Show("获取表数据成功");
@@ -177,7 +184,7 @@ namespace HKCardManager.UserPages
MessageLogNotify.GetInstance.ShowError("查询失败,请输入正确的时间段");
}
this.Invoke(() => { button1.Enabled = true; });
//});
}

//导出
@@ -197,5 +204,36 @@ namespace HKCardManager.UserPages
this.Invoke(() => { button2.Enabled = true; });
}
}

private void button3_Click(object sender, EventArgs e)
{
if (PageIndex <= 1)
{
this.button3.Enabled = false;
return;
}
PageIndex = PageIndex - 1;
var data = reportCountDtos.Skip((PageIndex - 1) * PageSize).Take(PageSize).ToList();
dataGridView1.DataSource = data;
this.button4.Enabled = true;
label1.Text = $"{PageIndex}/{TotalPage}";
}

private void button4_Click(object sender, EventArgs e)
{
if (PageIndex >= TotalPage)
{
this.button4.Enabled = false;
return;
}
PageIndex = PageIndex + 1;

var data = reportCountDtos.Skip((PageIndex - 1) * PageSize).Take(PageSize).ToList();
dataGridView1.DataSource = data;
this.button3.Enabled = true;
label1.Text = $"{PageIndex}/{TotalPage}";

}
}
}

+ 6
- 2
HKLib/Interfaces/HKLibHelper.cs Visa fil

@@ -201,7 +201,7 @@ namespace HKLib.Interfaces
if (string.IsNullOrEmpty(data))
return new List<UserListDto>();
var res = data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<UserListDto>>();
return res.Where(t => !t.Name.Contains("管理员")).OrderByDescending(t => t.Num).ToList();
return res.Where(t => !t.Name.Contains("管理员")).OrderBy(t => t.Num).ToList();
}

/// <summary>
@@ -215,7 +215,11 @@ namespace HKLib.Interfaces
{
t.NodePath = $"{Configer.SaasRoute}api/one-card/mmenber-card";
t.ReqType = MultiType.POST;
t.JsonParam = (new { tagId = input.OrgId, realName = input.Name, phone = input.Phone, cardNum = input.CardNo }).ToJson();
t.JsonParam = (new { tagId = input.OrgId,
realName = input.Name,
num=input.Num,
phone = input.Phone,
cardNum = input.CardNo }).ToJson();
}).Build().RunStringFirstAsync();
return data.ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool();



Laddar…
Avbryt
Spara