public string TeacherDelReceive(byte[] UserIDBytes, byte[] userNameBytes, byte[] logContentBytes, byte[] resultBytes) { bool TnF; string TS; int rst; try { int outId = Convert.ToInt32(this.DeserializeObject(UserIDBytes)); string userName = this.DeserializeObject(userNameBytes).ToString(); string logContent = this.DeserializeObject(logContentBytes).ToString(); string result = this.DeserializeObject(resultBytes).ToString(); APIBLL api = new APIBLL(); using (TransactionScope trans = new TransactionScope()) { Member_Account tempModel = api.GetMemberAccountByOutId(outId); if (tempModel != null) { int accountId = tempModel.Id; api.DeleteMemberAccount(accountId); api.DeleteMemberBaseInfo(accountId); api.DeleteSubject(accountId); api.DeleteSection(accountId); api.DeleteGrade(accountId); api.DeleteJob(accountId); api.DeleteRank(accountId); api.DeleteTrainingType(accountId); trans.Complete(); TnF = true; TS = "删除成功!"; rst = accountId; this.WriteLog(TraceEventType.Information, 1, "删除教师"); } else { TnF = false; TS = "没有用户信息!"; rst = 0; } } } catch (Exception e) { this.WriteLog(TraceEventType.Error, 0, e.ToString()); TnF = false; TS = "删除失败!"; rst = 0; } TempClass tc = new TempClass(); tc.BIs = TnF; tc.Str = TS; tc.I = rst; return string.Format("{0};{1};{2}", tc.BIs, tc.Str, tc.I); }