Sharepoint 中读取得不同类型SPField 时的处理方式之一
来源:互联网 发布:淘宝店招导航颜色代码 编辑:程序博客网 时间:2024/05/16 05:32
private string GetDataFromLookUpOrUser(string tempString)
{
string temp = "";
string temp2 = "";
string temp3 = "";
string temp4 = "";
int count = 0;
Boolean start = true;
for (int i = 0; i < tempString.Length; i++)
{
temp += tempString.Substring(i, 1);
if (i < tempString.Length - 1)
{
if (tempString.Substring(i, 2) == "#^")
{
if (start == true)
{
temp2 = temp.Substring(0, temp.Length - 1);
temp = "";
i++;
start = false;
}
}
else if (tempString.Substring(i, 2) == "^#")
{
temp3 += temp.Substring(1, temp.Length - 2);
temp = "";
i++;
start = true;
count = 0;
temp4 += temp2 + temp3;
temp3 = "";
}
else if (tempString.Substring(i, 2) == ";#" && start == false)
{
count++;
if (count % 2 == 0)
{
temp3 += temp.Substring(1, temp.Length - 2);
temp3 = temp3 + ",";
temp = "";
i++;
}
else
{
temp = "";
}
}
}
}
return temp4 + temp;
}
private string GetDataFromCalculatedField(string tempString)
{
string temp = "";
string temp2 = "";
string temp3 = "";
string temp4 = "";
int count = 0;
Boolean start = true;
for (int i = 0; i < tempString.Length; i++)
{
temp += tempString.Substring(i, 1);
if (i < tempString.Length - 1)
{
if (tempString.Substring(i, 2) == "#%")
{
if (start == true)
{
temp2 = temp.Substring(0, temp.Length - 1);
temp = "";
i++;
start = false;
}
}
else if (tempString.Substring(i, 2) == "%#")
{
temp3 += temp.Substring(1, temp.Length - 2);
temp = "";
i++;
start = true;
count = 0;
temp4 += temp2 + temp3;
temp3 = "";
}
else if (tempString.Substring(i, 2) == ";#" && start == false)
{
count++;
if (count % 2 == 0)
{
temp3 += temp.Substring(1, temp.Length - 2);
temp3 = temp3 + ",";
temp = "";
i++;
}
else
{
temp = "";
}
}
}
}
return temp4 + temp;
}
private string GetDataFromMultipleChoice(string tempString)
{
string temp = "";
string temp2 = "";
string temp3 = "";
string temp4 = "";
Boolean start = true;
for (int i = 0; i < tempString.Length; i++)
{
temp += tempString.Substring(i, 1);
if (i < tempString.Length - 3)
{
if (tempString.Substring(i, 4) == "#*MC")
{
if (start == true)
{
temp2 = temp.Substring(0, temp.Length - 1);
temp = "";
i += 3;
start = false;
}
}
else if (tempString.Substring(i, 4) == "MC*#")
{
temp = "";
i += 3;
start = true;
temp4 += temp2 + temp3.Substring(0, temp3.Length - 1);
}
else if (tempString.Substring(i, 2) == ";#")
{
temp3 += temp.Substring(0, temp.Length - 1);
temp3 = temp3 + ",";
temp = "";
i++;
}
}
}
return temp4 + temp;
}
/// <summary>
/// 取得 HyperLink 类型的值
/// </summary>
/// <param name="strValue"></param>
/// <returns></returns>
private string GetDataFromHyperLink(string strValue)
{
if (strValue == "")
{
return "";
}
if (strValue.IndexOf(",") > 0)
{
return strValue.Substring(0, strValue.IndexOf(","));
}
else
{
return strValue;
}
}
- Sharepoint 中读取得不同类型SPField 时的处理方式之一
- Sharepoint 中读取得不同类型SPField 时的处理方式之二
- Tensorflow中对于不同类型数据的读取
- SharePoint 获取SPField 相关信息
- ExpandableListView的用法,不同类型数据源的处理方式
- 在项目中如何读取不同类型的文件
- .net读取文档变乱码得处理方式
- sharepoint 开发常见错误的处理方式
- 卷积神经网络中不同类型的卷积方式介绍
- 使用SPField的InternalName属性时的一点问题。
- Mysql 分区处理NULL的得方式
- Spring不同类型的注入方式
- 在SharePoint中使用WorkItem方式批量处理Item
- 深入浅出SharePoint—对不同类型的字段进行赋值
- js中不同类型的循环
- iOS中TableView的不同类型
- iOS中TableView的不同类型
- 不同类型投资者的炒金方式
- 2009.04.12
- Microsoft DirectX SDK (March 2009)在VS 2008中的配置
- DELPHI 托盘 实例
- 2009.04.13
- OO系统分析员之路--用例分析系列(7)--用例规约的编写--业务规则和实体描述[整理重发]
- Sharepoint 中读取得不同类型SPField 时的处理方式之一
- Delphi做的软件自动更新
- 2009.04.14
- Vector 转換成数组的问题
- 一次伟大的Web革命书
- Sharepoint 中读取得不同类型SPField 时的处理方式之二
- 9个字中能测出你心仪的人啥时出现?
- PowerDesinger 在PB开发中的应用 随笔
- VS2008 PRO 、WDK 和DDKWizard搭建Vista驱动开发环境