Pārlūkot izejas kodu

bug修改

Lishi
pry pirms 2 gadiem
vecāks
revīzija
3cf1d5f913
6 mainītis faili ar 56 papildinājumiem un 53 dzēšanām
  1. +2
    -2
      HKCardManager/Form1.Designer.cs
  2. +18
    -11
      HKCardManager/UserPages/CancellationPage.cs
  3. +5
    -29
      HKCardManager/UserPages/CarMangerPage.Designer.cs
  4. +9
    -9
      HKCardManager/UserPages/CarMangerPage.cs
  5. +1
    -1
      HKCardManager/UserPages/ReportFormPage.Designer.cs
  6. +21
    -1
      HKCardManager/UserPages/ReportFormPage.cs

+ 2
- 2
HKCardManager/Form1.Designer.cs Parādīt failu

@@ -315,7 +315,7 @@
this.button9.Size = new System.Drawing.Size(220, 38);
this.button9.TabIndex = 3;
this.button9.Tag = "记次就餐消费明细表";
this.button9.Text = "记次就餐消费明细表";
this.button9.Text = "月餐段汇总表";
this.button9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button9.UseVisualStyleBackColor = false;
this.button9.Click += new System.EventHandler(this.button11_Click);
@@ -343,7 +343,7 @@
this.button11.Size = new System.Drawing.Size(220, 38);
this.button11.TabIndex = 1;
this.button11.Tag = "月餐段汇总表";
this.button11.Text = "月餐段汇总表";
this.button11.Text = "月餐段消费表";
this.button11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button11.UseVisualStyleBackColor = false;
this.button11.Click += new System.EventHandler(this.button11_Click);


+ 18
- 11
HKCardManager/UserPages/CancellationPage.cs Parādīt failu

@@ -50,22 +50,29 @@ namespace HKCardManager.UserPages
Task.Factory.StartNew(() =>
{
this.Invoke(() => { button2.Enabled = false; });
bool res = false;
try

var temp = Global.UserListDtos.FirstOrDefault(p => p.UserName == name);
if (temp != null)
{
res = HKLibHelper.CardStutasChange(new CardStutasDto()
if (!string.IsNullOrEmpty(temp.CardNum))
{
var res = HKLibHelper.CardStutasChange(new CardStutasDto()
{
keywrod = name,
Stutas = status
});
if (res) MessageLogNotify.GetInstance.Show($"用户 {TagName} 成功");
else MessageLogNotify.GetInstance.ShowError($"用户 {TagName} 失败,请检查名称是否正常");
}
else
{
keywrod = name,
Stutas = status
});
MessageLogNotify.GetInstance.ShowError("该用户未注册卡号");
}
}
catch (Exception ex)
else
{
MessageLogNotify.GetInstance.ShowError("请输入正确定名字");
MessageLogNotify.GetInstance.ShowError("该用户不存在");
}

if (res) MessageLogNotify.GetInstance.Show($"用户 {TagName} 成功");
else MessageLogNotify.GetInstance.ShowError($"用户 {TagName} 失败,请重试");
this.Invoke(() => { button2.Enabled = true; });
});
}


+ 5
- 29
HKCardManager/UserPages/CarMangerPage.Designer.cs Parādīt failu

@@ -30,8 +30,6 @@
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
@@ -46,7 +44,7 @@
// 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(98, 285);
this.button2.Location = new System.Drawing.Point(98, 248);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(190, 34);
this.button2.TabIndex = 29;
@@ -57,7 +55,7 @@
// 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(98, 229);
this.button1.Location = new System.Drawing.Point(98, 192);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(190, 34);
this.button1.TabIndex = 28;
@@ -65,24 +63,6 @@
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textBox4.Location = new System.Drawing.Point(98, 131);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(190, 28);
this.textBox4.TabIndex = 27;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label5.Location = new System.Drawing.Point(15, 131);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(90, 21);
this.label5.TabIndex = 26;
this.label5.Text = "手机号码:";
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@@ -106,7 +86,7 @@
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(98, 179);
this.comboBox1.Location = new System.Drawing.Point(98, 142);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(190, 29);
this.comboBox1.TabIndex = 19;
@@ -115,7 +95,7 @@
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(15, 182);
this.label1.Location = new System.Drawing.Point(15, 145);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(90, 21);
this.label1.TabIndex = 18;
@@ -155,12 +135,10 @@
this.panel1.Controls.Add(this.radioButton2);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label2);
this.panel1.Location = new System.Drawing.Point(331, 97);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(301, 335);
this.panel1.Size = new System.Drawing.Size(301, 297);
this.panel1.TabIndex = 31;
//
// comboBox2
@@ -188,8 +166,6 @@
#endregion
private Button button2;
private Button button1;
private TextBox textBox4;
private Label label5;
private TextBox textBox2;
private Label label2;
private ComboBox comboBox1;


+ 9
- 9
HKCardManager/UserPages/CarMangerPage.cs Parādīt failu

@@ -48,7 +48,7 @@ namespace HKCardManager.UserPages
var user = Global.UserListDtos.FirstOrDefault(p => !string.IsNullOrEmpty(comboBox2.Text.Trim()) && !string.IsNullOrEmpty(p.UserName) && p.UserName == comboBox2.Text.Trim());
if (user != null && !string.IsNullOrEmpty(user.Phone))
{
textBox4.Text = user.Phone;
//textBox4.Text = user.Phone;
if (!string.IsNullOrEmpty(user.OrgName) && Global.OrgList.Contains(user.OrgName))
{
comboBox1.Text = user.OrgName;
@@ -126,7 +126,7 @@ namespace HKCardManager.UserPages
var user = Global.UserListDtos.FirstOrDefault(p => !string.IsNullOrEmpty(comboBox2.Text.Trim()) && !string.IsNullOrEmpty(p.UserName) && p.UserName == comboBox2.Text.Trim());
if (user != null && !string.IsNullOrEmpty(user.Phone))
{
textBox4.Text = user.Phone;
//textBox4.Text = user.Phone;
if (!string.IsNullOrEmpty(user.OrgName) && Global.OrgList.Contains(user.OrgName))
{
comboBox1.Text = user.OrgName;
@@ -157,17 +157,17 @@ namespace HKCardManager.UserPages
MessageLogNotify.GetInstance.ShowWarning("请输入姓名");
return;
}
if (!textBox4.Text.Trim().IsMobile())
{
MessageLogNotify.GetInstance.ShowWarning("手机号格式不正确");
return;
}
//if (!textBox4.Text.Trim().IsMobile())
//{
// MessageLogNotify.GetInstance.ShowWarning("手机号格式不正确");
// return;
//}
string OrgName = comboBox1.Text;
string worker = new IdWorker(1, 1).NextId().ToString();// ID生成
UserDto userDto = new UserDto()
{
Name = textBox2.Text.Trim(),
Phone = textBox4.Text.Trim(),
//Phone = textBox4.Text.Trim(),
OrgId = orgTables.FirstOrDefault(p => p.Name == comboBox1.Text)?.SId,
CardNo = worker
};
@@ -217,7 +217,7 @@ namespace HKCardManager.UserPages
this.Invoke(() =>
{
textBox2.Text = users.Name;
textBox4.Text = users.Phone;
//textBox4.Text = users.Phone;
if (users.OrgInfo != null && users.OrgInfo.Count > 0)
{
comboBox1.Text = users.OrgInfo.ElementAt(0).Name;


+ 1
- 1
HKCardManager/UserPages/ReportFormPage.Designer.cs Parādīt failu

@@ -209,11 +209,11 @@
//
// 总计消费次数
//
this.总计消费次数.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.总计消费次数.DataPropertyName = "TotalCount";
this.总计消费次数.HeaderText = "总计消费次数";
this.总计消费次数.Name = "总计消费次数";
this.总计消费次数.ReadOnly = true;
this.总计消费次数.Width = 110;
//
// ReportFormPage
//


+ 21
- 1
HKCardManager/UserPages/ReportFormPage.cs Parādīt failu

@@ -122,7 +122,27 @@ namespace HKCardManager.UserPages
reportCountDtos = res;
this.Invoke(() =>
{
dataGridView1.Columns[0].Visible = false;
if (type == 1)
{
dataGridView1.Columns[0].Visible = true;
dataGridView1.Columns[1].Visible = false;
dataGridView1.Columns[2].Visible = true;
dataGridView1.Columns[3].Visible = false;
}
else if (type == 2)
{
dataGridView1.Columns[0].Visible = false;
dataGridView1.Columns[1].Visible = false;
dataGridView1.Columns[2].Visible = true;
dataGridView1.Columns[3].Visible = false;
}
else if (type == 3)
{
dataGridView1.Columns[0].Visible = true;
dataGridView1.Columns[1].Visible = false;
dataGridView1.Columns[2].Visible = false;
dataGridView1.Columns[3].Visible = true;
}
dataGridView1.DataSource = reportCountDtos;
button2.Enabled = true;
});


Notiek ielāde…
Atcelt
Saglabāt