本文整理汇总了C#中Spartacus.EndRow方法的典型用法代码示例。如果您正苦于以下问题:C# Spartacus.EndRow方法的具体用法?C# Spartacus.EndRow怎么用?C# Spartacus.EndRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spartacus
的用法示例。
在下文中一共展示了Spartacus.EndRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDataRow
/// <summary>
/// Evento disparado quando uma nova linha é incluída.
/// </summary>
/// <param name="p_sheet">Planilha do template.</param>
private void OnDataRow(Spartacus.ThirdParty.SejExcel.gSheet p_sheet)
{
Spartacus.Utils.Excel.Sheet v_info;
System.Data.DataRow v_row;
string[] v_tmp;
int v_in_value;
double v_re_value;
string v_tail;
v_info = (Spartacus.Utils.Excel.Sheet) this.v_sheets [p_sheet.Index-1];
if ((v_info.v_currentrow - v_info.v_fixedrows - 1) < v_info.v_data.Rows.Count)
{
p_sheet.BeginRow(v_info.v_currentrow);
v_row = v_info.v_data.Rows [v_info.v_currentrow - v_info.v_fixedrows - 1];
foreach (System.Collections.Generic.KeyValuePair<int,string> v_pair in v_info.v_mapping)
{
v_tmp = v_pair.Value.Split('_');
v_tail = v_pair.Value.Substring(3);
switch (v_tmp [0].ToLower())
{
case "in":
if (int.TryParse(v_row [v_tail].ToString(), out v_in_value))
p_sheet.WriteCell(v_pair.Key, v_in_value);
else
p_sheet.WriteCell(v_pair.Key, v_row [v_tail].ToString());
break;
case "dt":
if (int.TryParse(v_row [v_tail].ToString(), out v_in_value))
p_sheet.WriteCell(v_pair.Key, v_in_value);
else
p_sheet.WriteCell(v_pair.Key, v_row [v_tail].ToString());
break;
case "re":
if (double.TryParse(v_row[v_tail].ToString().Replace(",", "."), System.Globalization.NumberStyles.Any, new System.Globalization.CultureInfo("en-US"), out v_re_value))
p_sheet.WriteCell(v_pair.Key, v_re_value);
else
p_sheet.WriteCell(v_pair.Key, v_row [v_tail].ToString());
break;
default:
p_sheet.WriteCell(v_pair.Key, v_row [v_tail].ToString());
break;
}
}
p_sheet.EndRow();
((Spartacus.Utils.Excel.Sheet) this.v_sheets [p_sheet.Index - 1]).v_currentrow++;
this.v_perc += this.v_inc;
this.v_currentrow++;
this.v_progress.FireEvent("Spartacus.Utils.Excel", "ExportXLSX", this.v_perc, "Planilha " + ((Spartacus.Utils.Excel.Sheet) this.v_sheets [p_sheet.Index - 1]).v_name + ": linha " + this.v_currentrow.ToString() + " de " + this.v_numtotalrows.ToString());
}
}