@@ -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; | |||
// | |||
@@ -112,18 +112,18 @@ | |||
<value>2.0</value> | |||
</resheader> | |||
<resheader name="reader"> | |||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
</resheader> | |||
<resheader name="writer"> | |||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
</resheader> | |||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
<value>17, 17</value> | |||
</metadata> | |||
<metadata name="txtUserName.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<metadata name="txtUserName.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<value>True</value> | |||
</metadata> | |||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | |||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | |||
<data name="picUserName.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
<value> | |||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAA/5JREFUaEPV | |||
@@ -147,7 +147,7 @@ | |||
Ei7+AAAAAElFTkSuQmCC | |||
</value> | |||
</data> | |||
<metadata name="txtPassWord.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<metadata name="txtPassWord.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<value>True</value> | |||
</metadata> | |||
<data name="picPassWord.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
@@ -171,7 +171,7 @@ | |||
AElFTkSuQmCC | |||
</value> | |||
</data> | |||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<value>85</value> | |||
</metadata> | |||
<data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
@@ -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 | |||
@@ -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; | |||
} | |||
} |
@@ -123,17 +123,41 @@ namespace StuMgmClient | |||
} | |||
#region 教师操作 | |||
internal static ErrCode RefreshAllUserCourseInfo(short job_id, int token) | |||
{ | |||
List<UserCourseInfo> 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) | |||
{ | |||
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) | |||
//{ | |||
// userCourseInfo = null; | |||
// UserCourseInfoReq infoRe = new UserCourseInfoReq(); | |||
// infoRe.Job_Id = job_id; | |||
// infoRe.Token = token; | |||
//} | |||
if (!(o.Object is List<UserCourseInfo>)) | |||
// return ErrCode.ErrData; | |||
userCourseInfo = (List<UserCourseInfo>)o.Object; | |||
return ErrCode.Success; | |||
} | |||
#endregion | |||
} | |||
} |
@@ -14,6 +14,7 @@ namespace StuMgmClient | |||
static Dictionary<short, CourseInfo> allCourseInfo; | |||
internal static Dictionary<short, CourseStatusEnum> allCourseStatus; | |||
static List<CourseInfo> courseInfo; | |||
static Dictionary<short, UserCourseInfo> allUserCourseInfo; | |||
internal static ErrCode InitSystemData() | |||
{ | |||
ErrCode err; | |||
@@ -61,6 +62,18 @@ namespace StuMgmClient | |||
return ErrCode.Success; | |||
} | |||
internal static ErrCode RefreshAllUserCourseInfo(List<UserCourseInfo> info) | |||
{ | |||
//将List<UserCourseInfo>转为Dictionary<short,UserCourseInfo> | |||
foreach (var item in info) | |||
{ | |||
allUserCourseInfo=new Dictionary<short,UserCourseInfo>(); | |||
allUserCourseInfo.Add(item.JobId, item); | |||
} | |||
return ErrCode.Success; | |||
} | |||
//internal static void StreeList() | |||
//{ | |||
// allStreeDatas = new Dictionary<short,UserCourseDetail>(); | |||
@@ -152,6 +165,24 @@ namespace StuMgmClient | |||
} | |||
return dt; | |||
} | |||
static DataTable ListToDb(List<UserCourseInfo> 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); | |||
@@ -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); | |||
} | |||
} | |||
@@ -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"; | |||
@@ -112,24 +112,24 @@ | |||
<value>2.0</value> | |||
</resheader> | |||
<resheader name="reader"> | |||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
</resheader> | |||
<resheader name="writer"> | |||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<metadata name="操作.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |||
<value>True</value> | |||
</metadata> | |||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | |||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | |||
<data name="panLeft.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||
<value> | |||
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwO | |||