📄 test_wbcontent.cs
字号:
using System;
using System.Reflection;
using System.IO;
using System.Globalization;
using System.Resources;
using CallCenter.Modules;
using CallCenter.BusinessLayer;
using CallCenter.OracleDAL;
using System.Collections;
namespace CallCenter.TestCode
{
/// <summary>
///
/// </summary>
public class Test_WBContent
{
private static String errorfile="F:\\net_project\\callcenter\\error.log";
private static String logfile="F:\\net_project\\callcenter\\log.log";
public Test_WBContent()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public void test_addWBContent()
{
WBContentInfo info = new WBContentInfo() ;
info.wbid = 16;
info.opid = "operater1";
info.opname = "街道操作员";
string [] arrayContent = new string[]{"处理一","处理张内容","处理","处理都尉","处理在演鹏","处理旺鹏","处理处理处理张要可","处理利益","处理处理处理李铁","处理处理赵均这","处理处理李金鱼"};
WBContentBLL bll = new WBContentBLL();
try
{
foreach(string content in arrayContent)
{
info.opcontent = content;
bll.addWBContent(info);
}
}
catch(Exception e)
{
TextWriter error = new StreamWriter(errorfile,true);
error.WriteLine(e.Message.ToString());
error.WriteLine(e.StackTrace);
error.Close();
}
finally
{
}
}
public void test_delWBContentById(int id)
{
try
{
WBContentBLL bll = new WBContentBLL();
bll.delWBContentById(id);
}
catch(Exception e)
{
TextWriter error = new StreamWriter(errorfile,true);
error.WriteLine(e.Message.ToString());
error.WriteLine(e.StackTrace);
error.Close();
}
finally
{
}
}
public void test_delWBContentByWBId(int wbid)
{
try
{
WBContentBLL bll = new WBContentBLL();
bll.delWBContentByWBId(wbid);
}
catch(Exception e)
{
TextWriter error = new StreamWriter(errorfile,true);
error.WriteLine(e.Message.ToString());
error.WriteLine(e.StackTrace);
error.Close();
}
finally
{
}
}
public void test_updateWBContent(int id)
{
WBContentInfo info = new WBContentInfo() ;
info.wbid = 11;
info.opid = "operater2";
info.opname = "街道操作员2";
info.id = id;
info.opcontent="更新后的处理内容。";
WBContentBLL bll = new WBContentBLL();
try
{
bll.updateWBContent(info);
}
catch(Exception e)
{
TextWriter error = new StreamWriter(errorfile,true);
error.WriteLine(e.Message.ToString());
error.WriteLine(e.StackTrace);
error.Close();
}
finally
{
}
}
public void test_getWBContentByWBId(int wbid)
{
WBContentBLL bll = new WBContentBLL();
try
{
ArrayList list = bll.getWBContentByWBId(wbid);
IEnumerator enu = list.GetEnumerator();
enu.Reset();
while(enu.MoveNext())
{
TextWriter log = new StreamWriter(logfile,true);
log.WriteLine((WBContentInfo)enu.Current);
log.Close();
}
}
catch(Exception e)
{
TextWriter error = new StreamWriter(errorfile,true);
error.WriteLine(e.Message.ToString());
error.WriteLine(e.StackTrace);
error.Close();
}
finally
{
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -