From bcd3963d936a9f5ff5eb1304705ebfd49cd6b630 Mon Sep 17 00:00:00 2001
From: "WIN-G7N5C0B818G\\Administrator" <971785472@qq.com>
Date: Sat, 30 Jan 2021 14:30:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=99=E5=B8=88=E7=AB=AF?=
=?UTF-8?q?=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
StuMgmClient/LoginForm.designer.cs | 2 ++
StuMgmClient/LoginForm.resx | 14 ++++-----
StuMgmClient/SetForm.cs | 2 +-
StuMgmClient/SetForm.designer.cs | 39 ++++++++++++++---------
StuMgmClient/SystemCtrl.cs | 46 +++++++++++++++++++++-------
StuMgmClient/SystemData.cs | 31 +++++++++++++++++++
StuMgmClient/TeacherForm.cs | 10 +++---
StuMgmClient/TeacherForm.designer.cs | 1 +
StuMgmClient/TeacherForm.resx | 14 ++++-----
9 files changed, 113 insertions(+), 46 deletions(-)
diff --git a/StuMgmClient/LoginForm.designer.cs b/StuMgmClient/LoginForm.designer.cs
index d9df3ec..60ef77f 100644
--- a/StuMgmClient/LoginForm.designer.cs
+++ b/StuMgmClient/LoginForm.designer.cs
@@ -191,6 +191,7 @@
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(196, 30);
this.txtUserName.TabIndex = 3;
+ this.txtUserName.Text = "1942";
this.txtUserName.WordWrap = false;
//
// picUserName
@@ -221,6 +222,7 @@
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.Size = new System.Drawing.Size(196, 30);
this.txtPassWord.TabIndex = 4;
+ this.txtPassWord.Text = "1";
this.txtPassWord.UseSystemPasswordChar = true;
this.txtPassWord.WordWrap = false;
//
diff --git a/StuMgmClient/LoginForm.resx b/StuMgmClient/LoginForm.resx
index c659c5a..db0dd7a 100644
--- a/StuMgmClient/LoginForm.resx
+++ b/StuMgmClient/LoginForm.resx
@@ -112,18 +112,18 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
17, 17
-
+
True
-
+
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAA/5JREFUaEPV
@@ -147,7 +147,7 @@
Ei7+AAAAAElFTkSuQmCC
-
+
True
@@ -171,7 +171,7 @@
AElFTkSuQmCC
-
+
85
diff --git a/StuMgmClient/SetForm.cs b/StuMgmClient/SetForm.cs
index 45cf7cf..924b709 100644
--- a/StuMgmClient/SetForm.cs
+++ b/StuMgmClient/SetForm.cs
@@ -33,7 +33,7 @@ namespace StuMgmClient
lblName.Text = dr["Name"].ToString();
id = Convert.ToInt32(dr["ID"]);
missionId = Convert.ToInt32(dr["MissionId"]);
- lblMission.Text = dic2[missionId];
+ // lblMission.Text = dic2[missionId];
int state = Convert.ToInt32(dr["State"]);
comboBox2.SelectedIndex = state;//设置显示的item索引
try
diff --git a/StuMgmClient/SetForm.designer.cs b/StuMgmClient/SetForm.designer.cs
index e1c91f7..2d8cbe6 100644
--- a/StuMgmClient/SetForm.designer.cs
+++ b/StuMgmClient/SetForm.designer.cs
@@ -31,7 +31,6 @@
this.panel1 = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
- this.lblMission = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
@@ -39,6 +38,7 @@
this.button1 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
@@ -46,9 +46,9 @@
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.panel1.Controls.Add(this.comboBox1);
this.panel1.Controls.Add(this.lblName);
this.panel1.Controls.Add(this.label3);
- this.panel1.Controls.Add(this.lblMission);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.comboBox2);
this.panel1.Controls.Add(this.dateTimePicker1);
@@ -84,17 +84,6 @@
this.label3.TabIndex = 11;
this.label3.Text = "姓名:";
//
- // lblMission
- //
- this.lblMission.AutoSize = true;
- this.lblMission.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblMission.ForeColor = System.Drawing.Color.DarkSlateGray;
- this.lblMission.Location = new System.Drawing.Point(222, 92);
- this.lblMission.Name = "lblMission";
- this.lblMission.Size = new System.Drawing.Size(51, 26);
- this.lblMission.TabIndex = 10;
- this.lblMission.Text = "XXX";
- //
// label4
//
this.label4.AutoSize = true;
@@ -185,6 +174,26 @@
this.label1.TabIndex = 1;
this.label1.Text = "任务状态:";
//
+ // comboBox1
+ //
+ this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Items.AddRange(new object[] {
+ "未开始",
+ "进行中",
+ "待验收",
+ "等待验收中",
+ "验收中",
+ "验收完成",
+ "超时",
+ "预习"});
+ this.comboBox1.Location = new System.Drawing.Point(213, 86);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(124, 32);
+ this.comboBox1.TabIndex = 13;
+ //
// SetForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -197,7 +206,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "SetForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "SetForm";
+ this.Text = "个人详情";
this.Load += new System.EventHandler(this.SetForm_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
@@ -215,8 +224,8 @@
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label lblMission;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.ComboBox comboBox1;
}
}
\ No newline at end of file
diff --git a/StuMgmClient/SystemCtrl.cs b/StuMgmClient/SystemCtrl.cs
index 397cd98..4598c40 100644
--- a/StuMgmClient/SystemCtrl.cs
+++ b/StuMgmClient/SystemCtrl.cs
@@ -123,17 +123,41 @@ namespace StuMgmClient
}
+ #region 教师操作
+ internal static ErrCode RefreshAllUserCourseInfo(short job_id, int token)
+ {
+ List userInfo;
+ ErrCode err;
+
+ err = GetAllUserCourseInfo(job_id, token, out userInfo);
+ if (err != ErrCode.Success)
+ return err;
+
+ err = SystemData.RefreshAllUserCourseInfo(userInfo);
+ if (err != ErrCode.Success)
+ return err;
+
+ return ErrCode.Success;
+ }
+ static ErrCode GetAllUserCourseInfo(short job_id, int token, out List userCourseInfo)
+ {
+ userCourseInfo = null;
+ UserCourseInfoReq infoRe = new UserCourseInfoReq();
+ infoRe.Job_Id = job_id;
+ infoRe.Token = token;
+
+
+ ClientRequest req = new ClientRequest(ClientFunc.GetSomeoneUserCInfo, infoRe);
+ ServerResponse o = new ServerResponse(null);
+ ErrCode err = SystemComm.GetData(req, out o);
+ if (err != ErrCode.Success)
+ return err;
- //static ErrCode RefreshAllUserCourseInfo()
- //{
-
- //}
- //static ErrCode GetAllUserCourseInfo(short job_id,int token,out List userCourseInfo)
- //{
- // userCourseInfo = null;
- // UserCourseInfoReq infoRe = new UserCourseInfoReq();
- // infoRe.Job_Id = job_id;
- // infoRe.Token = token;
- //}
+ if (!(o.Object is List))
+ // return ErrCode.ErrData;
+ userCourseInfo = (List)o.Object;
+ return ErrCode.Success;
+ }
+ #endregion
}
}
diff --git a/StuMgmClient/SystemData.cs b/StuMgmClient/SystemData.cs
index 5c237c1..f93d904 100644
--- a/StuMgmClient/SystemData.cs
+++ b/StuMgmClient/SystemData.cs
@@ -14,6 +14,7 @@ namespace StuMgmClient
static Dictionary allCourseInfo;
internal static Dictionary allCourseStatus;
static List courseInfo;
+ static Dictionary allUserCourseInfo;
internal static ErrCode InitSystemData()
{
ErrCode err;
@@ -61,6 +62,18 @@ namespace StuMgmClient
return ErrCode.Success;
}
+ internal static ErrCode RefreshAllUserCourseInfo(List info)
+ {
+ //将List转为Dictionary
+ foreach (var item in info)
+ {
+ allUserCourseInfo=new Dictionary();
+ allUserCourseInfo.Add(item.JobId, item);
+ }
+ return ErrCode.Success;
+
+ }
+
//internal static void StreeList()
//{
// allStreeDatas = new Dictionary();
@@ -152,6 +165,24 @@ namespace StuMgmClient
}
return dt;
}
+ static DataTable ListToDb(List list)
+ {
+ DataTable dt = new DataTable();
+ dt.Columns.Add("job_id", typeof(short));
+ dt.Columns.Add("name", typeof(string));
+ dt.Columns.Add("status", typeof(string));
+ dt.Columns.Add("details", typeof(string));
+ for (int i = 0; i < list.Count; i++)
+ {
+ DataRow dr = dt.NewRow();
+ dr[0] = list[i].JobId;
+ dr[1] = list[i].Name;
+ dr[2] = list[i].Status;
+ dr[3] = list[i].Details;
+ dt.Rows.Add(dr);
+ }
+ return dt;
+ }
internal static DataTable StreeTable()
{
return ListToDb(courseInfo);
diff --git a/StuMgmClient/TeacherForm.cs b/StuMgmClient/TeacherForm.cs
index f3ad4a3..ffc1854 100644
--- a/StuMgmClient/TeacherForm.cs
+++ b/StuMgmClient/TeacherForm.cs
@@ -20,12 +20,12 @@ namespace StuMgmClient
//StudentMysql sms = new StudentMysql();
public TeacherForm(short job_id, int token)
{
- if (SystemCtrl.RefreshUserCourseInfo(job_id, token) != ErrCode.Success)
- throw new Exception("获取用户信息异常,请重新启动");
+ //if (SystemCtrl.RefreshAllUserCourseInfo(job_id, token) != ErrCode.Success)
+ // throw new Exception("获取用户信息异常,请重新启动");
InitializeComponent();
- userSet = ds;
+ // userSet = ds;
//datagrdaview表格初始数据格式化
- dic.Add(0, "未开始"); dic.Add(1, "进行中"); dic.Add(2, "待验收"); dic.Add(3, "等待验收中"); dic.Add(4, "验收中"); dic.Add(5, "验收完成"); dic.Add(6, "超时"); dic.Add(7, "预习");
+ //dic.Add(0, "未开始"); dic.Add(1, "进行中"); dic.Add(2, "待验收"); dic.Add(3, "等待验收中"); dic.Add(4, "验收中"); dic.Add(5, "验收完成"); dic.Add(6, "超时"); dic.Add(7, "预习");
}
//学员详情_修改按钮方法
private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
@@ -36,7 +36,7 @@ namespace StuMgmClient
SetForm set = new SetForm(drViews);
set.ShowDialog();
if (set.DialogResult == DialogResult.Yes)
- // ds = sms.SelectMissionState();
+ //ds = sms.SelectMissionState();
ShowData(ds);
}
}
diff --git a/StuMgmClient/TeacherForm.designer.cs b/StuMgmClient/TeacherForm.designer.cs
index e9f9168..84783a1 100644
--- a/StuMgmClient/TeacherForm.designer.cs
+++ b/StuMgmClient/TeacherForm.designer.cs
@@ -650,6 +650,7 @@
this.Controls.Add(this.panUserInfo);
this.Controls.Add(this.panManagement);
this.DoubleBuffered = true;
+ this.MaximizeBox = false;
this.Name = "TeacherForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "TeacherForm";
diff --git a/StuMgmClient/TeacherForm.resx b/StuMgmClient/TeacherForm.resx
index 88a2d6d..dcf2ec6 100644
--- a/StuMgmClient/TeacherForm.resx
+++ b/StuMgmClient/TeacherForm.resx
@@ -112,24 +112,24 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
True
-
+
True
-
+
True
-
+
True
-
+
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwO