//public string GetBBS(OleDbConnection objConn, int ID, int UID) //{ // bool flag; // StringBuilder builder; // int num; // goto Label_003B; //Label_0002: // switch (num) // { // case 0: // if (flag) // { // goto Label_0363; // } // num = 4; // goto Label_0002; // case 1: // case 10: // goto Label_01D6; // case 2: // goto Label_01A9; // case 3: // //builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_Speak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 10; // goto Label_0002; // case 4: // return ""; // case 5: // if ((1 == 0) || (0 == 0)) // { // goto Label_01D6; // } // goto Label_0363; // case 6: // return builder.ToString(); // case 7: // //if (reader.Read()) // //{ // // num = 11; // //} // //else // //{ // num = 6; // //} // goto Label_0002; // case 8: // flag = true; // builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_Speak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 2; // goto Label_0002; // case 9: // //if (!reader.Read()) // //{ // // goto Label_01A9; // //} // num = 8; // goto Label_0002; // case 11: // //if (!(reader["IsAdminRe"].ToString() == "False")) // //{ // builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_AdminSpeak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 5; // //} // //else // //{ // // num = 3; // //} // goto Label_0002; // } //Label_003B: // flag = false; // builder = new StringBuilder(); // //OleDbCommand command = new OleDbCommand("SELECT TOP 1 B.*,U.UserName FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE B.ID=" + ID.ToString() + " AND B.UID=" + UID.ToString() + " AND ReID=0", objConn); // //reader = command.ExecuteReader(); // num = 9; // goto Label_0002; //Label_01A9: // //reader.Close(); // num = 0; // goto Label_0002; //Label_01D6: // num = 7; // goto Label_0002; //Label_0363: // //command.CommandText = "SELECT B.*,U.UserName FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE ReID=" + ID.ToString(); // //reader = command.ExecuteReader(); // num = 1; // goto Label_0002; //} //public string GetBBSForManage(OleDbConnection objConn, int ID) //{ // bool flag; // StringBuilder builder; // OleDbDataReader reader; // int num; // goto Label_003B; //Label_0002: // switch (num) // { // case 0: // case 7: // case 8: // num = 3; // goto Label_0002; // case 1: // //reader.Close(); // return builder.ToString(); // case 2: // builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_Speak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 7; // goto Label_0002; // case 3: // if (reader.Read()) // { // num = 4; // } // else // { // num = 1; // } // goto Label_0002; // case 4: // if (!(reader["IsAdminRe"].ToString() == "False")) // { // builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_AdminSpeak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 8; // } // else // { // num = 2; // } // goto Label_0002; // case 5: // if (flag) // { // //OleDbCommand command=new OleDbCommand(); //new了一个新的实例 // //command.CommandText = "SELECT B.*,U.UserName FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE ReID=" + ID.ToString(); // //reader = command.ExecuteReader(); // num = 0; // } // else // { // num = 11; // } // goto Label_0002; // case 6: // if (!reader.Read()) // { // goto Label_017C; // } // num = 10; // goto Label_0002; // case 9: // goto Label_017C; // case 10: // if ((1 != 0) && (0 != 0)) // { // } // flag = true; // builder.Append(string.Concat(new object[] { "<div class=BBS_Box><span class=BBS_Speak style='float:left'></span><span class=BBS_User>", reader["UserName"], ":</span><span class=BBS_Title>", reader["Caption"].ToString(), "</span><span class=BBS_Date>[", reader["SubmitDate"], "]</span><div class=BBS_Content>", reader["Content"].ToString().Replace("\r\n", "<br />"), "</div></div>" })); // num = 9; // goto Label_0002; // case 11: // return ""; // } //Label_003B: // flag = false; // builder = new StringBuilder(); // //reader = new OleDbCommand("SELECT TOP 1 B.*,U.UserName FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE B.ID=" + ID.ToString() + " AND ReID=0", objConn).ExecuteReader(); // num = 6; // goto Label_0002; //Label_017C: // reader.Close(); // num = 5; // goto Label_0002; //} //public string[] getBBSInfo(int ID) //{ // //OleDbDataReader reader = null; //赋初值 //Label_0027:; // string[] strArray = new string[] { "", "", "", "", "", "", "" }; // int num = 1; //Label_0002: // switch (num) // { // case 0: // case 5: // //reader = this.b.ExecuteReader(); // num = 4; // goto Label_0002; // case 1: // if (ID <= 0) // { // //this.b.CommandText = "SELECT TOP 1 Caption,Content,UserName,SubmitDate,ReDate,Status,ReID FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE ReID=0 ORDER BY ID DESC"; // num = 5; // } // else // { // num = 6; // } // goto Label_0002; // case 2: // //strArray[0] = reader["Caption"].ToString(); // //strArray[1] = reader["Content"].ToString(); // //strArray[2] = reader["UserName"].ToString(); // //strArray[3] = reader["SubmitDate"].ToString(); // //strArray[4] = reader["ReDate"].ToString(); // //strArray[5] = reader["Status"].ToString(); // //strArray[6] = reader["ReID"].ToString(); // num = 3; // goto Label_0002; // case 3: // break; // case 4: // //if (!reader.Read()) // //{ // break; // //} // num = 2; // goto Label_0002; // case 6: // //this.b.CommandText = "SELECT TOP 1 Caption,Content,UserName,SubmitDate,ReDate,Status,ReID FROM BBS B INNER JOIN [User] U ON B.UID=U.UID WHERE ID=" + ID.ToString(); // num = 0; // goto Label_0002; // default: // goto Label_0027; // } // //reader.Close(); // return strArray; //} public string[] getEmailAccount() { Label_0017: if ((1 != 0) && (0 != 0)) { } string[] strArray = new string[] { "" }; //this.b.CommandText = "SELECT TOP 1 Par FROM OQSSSysInfo WHERE ParName='Email'"; SqlDataReader reader = new SClass().GetParBySysBaseInfo("Email"); int num = 0; Label_0002: switch (num) { case 0: if (!reader.Read()) { break; } num = 2; goto Label_0002; case 1: break; case 2: strArray = Regex.Split(reader["Par"].ToString(), @"{\$\$}", RegexOptions.IgnoreCase); num = 1; goto Label_0002; default: goto Label_0017; } reader.Close(); return(strArray); }
//public void BBS_Update(int BBSID) //现在不包含bbs //{ // //this.b.CommandText = "UPDATE BBS SET Status=1 WHERE ID=" + BBSID.ToString() + " AND Status<>2"; // //this.b.ExecuteNonQuery(); //} public void fromStyleLibCopy(long ID, long TargetSID, long UID) { string str; SqlDataReader reader; SqlDataReader reader1; int num = 0; //赋初值 int num2; goto Label_0023; Label_0002: switch (num2) { case 0: return; case 1: goto Label_00F5; case 2: if (!reader.Read()) { goto Label_00F5; } num2 = 3; goto Label_0002; case 3: str = reader["StyleContent"].ToString(); num2 = 1; goto Label_0002; case 4: if (num != 0) { return; } num2 = 5; goto Label_0002; case 5: //this.b.CommandText = "INSERT INTO SurveyExpand (SID,UID,ExpandContent,ExpandType) VALUES(" + TargetSID.ToString() + "," + UID.ToString() + ",'" + str + "',9)"; reader1 = new SClass().GetTop1DefaultStyleLib(); if (reader1.Read()) { str = reader1["StyleContent"].ToString(); //设置默认样式 } new SClass().InsertSurveyExpand(TargetSID.ToString(), UID.ToString(), str, "9"); num2 = 0; goto Label_0002; } Label_0023: str = ""; //this.b.CommandText = "SELECT * FROM StyleLib WHERE ID=" + ID.ToString(); reader = new SClass().GetAllStyleLib(ID.ToString()); num2 = 2; goto Label_0002; Label_00F5: reader.Dispose(); //this.b.CommandText = "UPDATE SurveyExpand SET ExpandContent='" + str + "' WHERE ExpandType=9 AND SID=" + TargetSID.ToString() + " AND UID=" + UID.ToString(); num = new SClass().UpdateSurveyExpand(str, "9", TargetSID.ToString(), UID.ToString()); num2 = 4; goto Label_0002; }