本文整理汇总了C#中TemplateType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# TemplateType.ToString方法的具体用法?C# TemplateType.ToString怎么用?C# TemplateType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TemplateType
的用法示例。
在下文中一共展示了TemplateType.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTempletPath
public static string GetTempletPath(TemplateType type)
{
string dir = "", path = null;
FileSettingsSection section = ConfigurationManager.GetSection("fileSettings") as FileSettingsSection;
if (section.IsAbsolute)
{
if (!Directory.Exists(section.BaseDirectory)) Directory.CreateDirectory(section.BaseDirectory);
dir = section.BaseDirectory;
}
else
{
dir = HttpContext.Current.Server.MapPath(section.BaseDirectory);
if(!Directory.Exists(dir)) Directory.CreateDirectory(dir);
}
for (int i = 0; i < section.TemplateFiles.Count; i++)
{
if (section.TemplateFiles.AllKeys[i].ToLower() == type.ToString().ToLower())
{
path = Path.Combine(dir, section.TemplateFiles[section.TemplateFiles.AllKeys[i]].Value);
break;
}
}
return path;
}
示例2: GetReleasesByCategoryGuid
public List<Release> GetReleasesByCategoryGuid(Guid categoryGuid, TemplateType templateType)
{
DbCommand command = DbProviderHelper.CreateCommand("SelectReleasesByCategoryGuidAndTemplateType", CommandType.StoredProcedure);
command.Parameters.Add(DbProviderHelper.CreateParameter("@CategoryGuid", DbType.Guid, categoryGuid));
command.Parameters.Add(DbProviderHelper.CreateParameter("@TemplateType", DbType.String, templateType.ToString()));
DbDataReader dataReader = DbProviderHelper.ExecuteReader(command);
return GetReleases(dataReader);
}
示例3: List
/// <summary>
/// ��ȡģ���б�
/// </summary>
/// <param name="tempClass">����</param>
/// <param name="tempType">����</param>
/// <returns></returns>
public static ArrayList List(TemplateClasses tempClass, TemplateType tempType)
{
char tc = tempClass == TemplateClasses.U ? '0' : Convert.ToChar(tempClass.ToString());
char tt = tempType == TemplateType.U ? '0' : Convert.ToChar(tempType.ToString());
return List(tc, tt);
}
示例4: AddListToSUT
/// <summary>
/// A method used to Create a list by configured list name and specified list template.
/// </summary>
/// <param name="listTemplate">A parameter represents the template type of list template</param>
/// <returns>A return value represents the added list's id</returns>
protected string AddListToSUT(TemplateType listTemplate)
{
string uniqueListName = this.GetUniqueListName(listTemplate.ToString());
string listId = this.AddListToSUT(uniqueListName, listTemplate);
return listId;
}