本文整理汇总了C#中Data.GetImage方法的典型用法代码示例。如果您正苦于以下问题:C# Data.GetImage方法的具体用法?C# Data.GetImage怎么用?C# Data.GetImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data.GetImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEventLiteral
//.........这里部分代码省略.........
{
//VenueName.Text + "@&" +
if (venueMapping.ContainsKey(address))
{
row["SearchNum"] = venuesNumMapping[address].ToString();
if (row["Type"].ToString() == "E")
{
temp = row["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ");
if (temp.Length > 50)
temp = temp.Substring(0, 50) + "...";
venueMapping[address] += "<br/><div class=\\\"NavyLink12UD\\\" style=\\\" float: left; cursor: pointer;\\\" onclick=\\\"GoToThis(\\'" + "../" +
dat.MakeNiceName(row["Header"].ToString()) + "_" +
row["EID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(temp) + "</div>";
}
else
{
temp = row["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ");
if (temp.Length > 50)
temp = temp.Substring(0, 50) + "...";
venueMapping[address] += "<br/><div class=\\\"NavyLink12UD\\\" style=\\\" float: left; cursor: pointer;\\\" onclick=\\\"GoToThis(\\'" + "../" +
dat.MakeNiceName(row["Header"].ToString()) + "_" +
row["EID"].ToString() + "_Venue" + "\\');\\\">" +
dat.CleanExcelString(temp) + "</div>";
}
}
else
{
if (!isFirstElement)
{
i++;
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
if (row["Type"].ToString() == "E")
{
temp = row["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ");
if (temp.Length > 50)
temp = temp.Substring(0, 50) + "...";
venueMapping.Add(address, "\n\raddress = '" + address.Trim().Replace("'", "''").Replace("(", " ").Replace(")", " ") + " " +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; " +
"\n\rshowAddressUS('<span class=\\\"Green12Link2UD\\\" onclick=\\\"GoToThis(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
row["VID"].ToString() + "_Venue" + "\\');\\\">" +
dvV[0]["Name"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ") + "</span>', 0, address, 0, address, 1, " + i.ToString() + ", '" +
"<div class=\\\"NavyLink12UD\\\" onclick=\\\"GoToThis(\\'" + "../" +
dat.MakeNiceName(row["Header"].ToString()) + "_" +
row["EID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(temp) + "</div>");
}
else
{
temp = row["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ");
if (temp.Length > 50)
temp = temp.Substring(0, 50) + "...";
venueMapping.Add(address, "\n\raddress = '" + address.Trim().Replace("'", "''").Replace("(", " ").Replace(")", " ") + " " +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; " +
"\n\rshowAddressUS('<span class=\\\"Green12Link2UD\\\" onclick=\\\"GoToThis(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
示例2: GetEventLiteral
//.........这里部分代码省略.........
if (country.ToLower() == "us")
{
try
{
address = dat.GetAddress(dvV[0]["Address"].ToString(), false);
}
catch (Exception ex1)
{
address = "";
}
}
else
{
address = dat.GetAddress(dvV[0]["Address"].ToString(), true);
}
if (dvE[0]["Country"].ToString().ToLower() == "uk")
{
//VenueName.Text + "@&" +
if (venueMapping.ContainsKey(address))
{
row["SearchNum"] = venuesNumMapping[address].ToString();
venueMapping[address] += ",<br/><div style=\\\"color: #1fb6e7; font-weight: bold; text-decoration: underline; float: left; cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvE[0]["Header"].ToString()) + "_" +
dvE[0]["ID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(dvE[0]["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ")) + "</div>";
}
else
{
if (!isFirstElement)
{
i++;
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
venueMapping.Add(address, "address = '" + address.Trim().Replace("'", "''").Replace("(", " ").Replace(")", " ") + " " +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; " +
"showAddressUS('<span style=\\\"color: #98cb2a; font-weight: bold;text-decoration: underline; " +
" cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
dvV[0]["ID"].ToString() + "_Venue" + "\\');\\\">" +
dvV[0]["Name"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ") + "</span>', 0, address, 0, address, 1, " + i.ToString() + ", '" +
"<div style=\\\"color: #1fb6e7; font-weight: bold; text-decoration: underline; float: left; cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvE[0]["Header"].ToString()) + "_" +
dvE[0]["ID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(dvE[0]["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ")) + "</div>");
row["SearchNum"] = dat.GetImage(i.ToString());
DataRow r = dt.NewRow();
r["Address"] = address;
r["Letter"] = dat.GetImage(i.ToString());
dt.Rows.Add(r);
}
else
{
DataRow r = dt.NewRow();
r["Address"] = address;
r["Letter"] = dat.GetImage(i.ToString());
dt.Rows.Add(r);
row["SearchNum"] = dat.GetImage(i.ToString());
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
venueMapping.Add(address, "address = '" + address.Trim().Replace("'", "''").Replace("(", " ").Replace(")", " ") + " " +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
示例3: GetAllEventLiteral
protected int GetAllEventLiteral(DataView dv, Data dat)
{
Hashtable normalEventHash = new Hashtable();
DataView dvEvents = dv;
int i = 0;
string theLiteral = "<script type=\"text/javascript\">function initializeAll(){var address;";
int thecount = dvEvents.Count;
string oneStringRecord = "";
int normalRecordCount = 0;
int countOfAllUniqueVenues = 0;
try
{
string address = "";
string venue = "";
bool isFirstElement = true;
string country = "US";
Hashtable venueMapping = new Hashtable();
Hashtable venuesNumMapping = new Hashtable();
DataView dvRecords = new DataView();
DataTable dt = new DataTable();
DataColumn dc2 = new DataColumn("Address");
dt.Columns.Add(dc2);
dc2 = new DataColumn("Letter");
dt.Columns.Add(dc2);
foreach (DataRowView row in dvEvents)
{
if (!bool.Parse(row["isGroup"].ToString()))
{
if (!normalEventHash.Contains(row["EID"].ToString()))
{
normalEventHash.Add(row["EID"].ToString(), normalRecordCount.ToString());
address = "";
DataView dvE = dat.GetDataDV("SELECT * FROM Events WHERE ID=" + row["EID"].ToString());
DataView dvV = dat.GetDataDV("SELECT * FROM Venues WHERE ID=" + dvE[0]["Venue"].ToString());
DataView dvCountry = dat.GetDataDV("SELECT * FROM countries WHERE country_id=" + dvE[0]["Country"].ToString());
country = dvCountry[0]["country_2_code"].ToString();
if (country.ToLower() == "us")
{
try
{
address = dat.GetAddress(dvV[0]["Address"].ToString(), false);
}
catch (Exception ex1)
{
address = "";
}
}
else
{
address = dat.GetAddress(dvV[0]["Address"].ToString(), true);
}
if (dvE[0]["Country"].ToString().ToLower() == "uk")
{
//VenueName.Text + "@&" +
if (venueMapping.ContainsKey(address))
{
venueMapping[address] += ",<br/><div style=\\\"color: #1fb6e7; font-weight: bold; text-decoration: underline; float: left; cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvE[0]["Header"].ToString()) + "_" +
dvE[0]["ID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(dvE[0]["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ")) + "</div>";
}
else
{
countOfAllUniqueVenues++;
if (!isFirstElement)
{
i++;
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
venueMapping.Add(address, "address = '" + address.Trim().Replace("'", "''").Replace("(", " ").Replace(")", " ") + " " +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; " +
"showAddressUS('<span style=\\\"color: #98cb2a; font-weight: bold;text-decoration: underline; " +
" cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
dvV[0]["ID"].ToString() + "_Venue" + "\\');\\\">" +
dvV[0]["Name"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ") + "</span>', 1, address, 0, address, 1, " + i.ToString() + ", '" +
"<div style=\\\"color: #1fb6e7; font-weight: bold; text-decoration: underline; float: left; cursor: pointer;\\\" onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvE[0]["Header"].ToString()) + "_" +
dvE[0]["ID"].ToString() + "_Event" + "\\');\\\">" +
dat.CleanExcelString(dvE[0]["Header"].ToString().Replace("'",
" ").Replace("(", " ").Replace(")", " ")) + "</div>");
DataRow r = dt.NewRow();
r["Address"] = address;
r["Letter"] = dat.GetImage(i.ToString());
dt.Rows.Add(r);
}
//.........这里部分代码省略.........
示例4: GetVenuesLiteral
//.........这里部分代码省略.........
address = dat.GetAddress(dvV[0]["Address"].ToString(), false);
}
catch (Exception ex1)
{
address = "";
}
}
else
{
address = dat.GetAddress(dvV[0]["Address"].ToString(), true);
}
if (lastAddress == address && !isFirstElement)
isAddressSame = true;
else
isAddressSame = false;
if (dvV[0]["Country"].ToString().ToLower() == "uk")
{
if (venueMapping.ContainsKey(address))
{
row["SearchNum"] = venuesNumMapping[address].ToString();
venueMapping[address] += ",<br/><div style=\\\"color: #98cb2a;font-weight: bold;text-decoration: underline; float: left; cursor: pointer;\\\" " +
"onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
dvV[0]["ID"].ToString() + "_Venue" + "\\');\\\">" +
dvV[0]["Name"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + "</div>";
}
else
{
if (!isFirstElement)
{
i++;
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
venueMapping.Add(address, "address = '" + address.Replace("'", "''").Replace("(", " ").Replace(")", " ") +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; "+
"showAddressUS('',0, address, 0, address, 1, " + i.ToString() + ", '" +
"<div style=\\\"color: #98cb2a;font-weight: bold;text-decoration: underline; float: left; cursor: pointer;\\\" " +
"onclick=\\\"CloseWindow(\\'" + "../" +
dat.MakeNiceName(dvV[0]["Name"].ToString()) + "_" +
dvV[0]["ID"].ToString() + "_Venue" + "\\');\\\">" +
dvV[0]["Name"].ToString().Replace("'", " ").Replace("(",
" ").Replace(")", " ") + "</div> ");
row["SearchNum"] = dat.GetImage(i.ToString());
DataRow r = dt.NewRow();
r["Address"] = address;
r["Letter"] = dat.GetImage(i.ToString());
dt.Rows.Add(r);
}
else
{
DataRow r = dt.NewRow();
r["Address"] = address;
r["Letter"] = dat.GetImage(i.ToString());
dt.Rows.Add(r);
row["SearchNum"] = dat.GetImage(i.ToString());
venuesNumMapping.Add(address, dat.GetImage(i.ToString()));
venueMapping.Add(address, "address = '" + address.Replace("'", "''").Replace("(", " ").Replace(")", " ") +
dvV[0]["City"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
dvV[0]["Zip"].ToString().Replace("'", " ").Replace("(", " ").Replace(")", " ") + ", " +
country.Replace("'", " ").Replace("(", " ").Replace(")", " ") + "'; "+
" showAddressUS('',0, address, 0, address, 1, " + i.ToString() + ", '" +
"<div style=\\\"color: #98cb2a;font-weight: bold;text-decoration: underline; float: left; cursor: pointer;\\\" " +
"onclick=\\\"CloseWindow(\\'" + "../" +