diff --git a/StuMgmClient/Data.cs b/StuMgmClient/Data.cs index 71f3588..9e326fa 100644 --- a/StuMgmClient/Data.cs +++ b/StuMgmClient/Data.cs @@ -67,7 +67,7 @@ namespace StuMgmClient public string Name; public string Content; } - + [Serializable] public enum CourseStatusEnum @@ -86,26 +86,6 @@ namespace StuMgmClient - - - - - - - - - - - - - - - - - - - - /* diff --git a/StuMgmClient/LoginForm.cs b/StuMgmClient/LoginForm.cs index b57a8f8..dc9c0ec 100644 --- a/StuMgmClient/LoginForm.cs +++ b/StuMgmClient/LoginForm.cs @@ -7,11 +7,14 @@ namespace StuMgmClient { const string deaultIp = "10.10.0.44"; const int deaultPort = 502; + + + public LoginForm() { InitializeComponent(); SystemComm.Init(deaultIp, deaultPort); - if(SystemData.InitSystemData()!= ErrCode.Success) + if (SystemData.InitSystemData() != ErrCode.Success) throw new Exception("初始化异常,请重新启动"); } @@ -34,7 +37,6 @@ namespace StuMgmClient - private void chkPassWord_CheckedChanged(object sender, EventArgs e) { @@ -44,7 +46,7 @@ namespace StuMgmClient { } - + private void btnSubmit_Click(object sender, EventArgs e) { Roles userRole; diff --git a/StuMgmClient/StudentForm.cs b/StuMgmClient/StudentForm.cs index a0b65da..c4c074d 100644 --- a/StuMgmClient/StudentForm.cs +++ b/StuMgmClient/StudentForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; using System.Windows.Forms; namespace StuMgmClient @@ -17,6 +12,7 @@ namespace StuMgmClient m_token = token; if (SystemCtrl.RefreshUserCourseInfo(token) != ErrCode.Success) throw new Exception("获取用户信息异常,请重新启动"); + } diff --git a/StuMgmClient/SystemCtrl.cs b/StuMgmClient/SystemCtrl.cs index cec4dcf..32a2be8 100644 --- a/StuMgmClient/SystemCtrl.cs +++ b/StuMgmClient/SystemCtrl.cs @@ -30,8 +30,8 @@ namespace StuMgmClient internal static ErrCode GetCourseInfo(out List courseInfo) { courseInfo = null; - - ClientRequest req = new ClientRequest(FuncCode.VerifLogin, null); + //****** + ClientRequest req = new ClientRequest(FuncCode.GetCourseInfo, null); object o; ErrCode err = SystemComm.GetData(req, out o);