本文整理汇总了C#中Car.getId方法的典型用法代码示例。如果您正苦于以下问题:C# Car.getId方法的具体用法?C# Car.getId怎么用?C# Car.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Car
的用法示例。
在下文中一共展示了Car.getId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addNewTable
private void addNewTable(Car car)
{
Table tbl = new Table();
tbl.Width = new Unit("100%");
tbl.Height = new Unit("100%");
//------------------row-----------------------
TableRow rw = new TableRow();
//---------------------cell--------------
TableCell cell = new TableCell();
cell.Width = 300;
LinkButton carTitle = new LinkButton();
carTitle.Font.Size = 20;
carTitle.Text = car.getCarBrand() + " " + car.getCarModel();
carTitle.Click += new EventHandler(LinkButton1_Click);
carTitle.ID = "Title" + car.getId().ToString();
carTitle.CssClass = "linkbtn";
cell.Controls.Add(carTitle);
rw.Cells.Add(cell);
//---------------------cell--------------
cell = new TableCell();
Panel div = new Panel();
div.Style.Add("float", "right");
Button btnEdit = new Button();
btnEdit.Click += new EventHandler(btnAddFuel_Click);
btnEdit.Text = "Редактирай";
btnEdit.Style.Add("margin-left", "15px");
btnEdit.Style.Add("margin-right", "15px");
btnEdit.ID = "Edit" + car.getId().ToString();
btnEdit.CssClass = "btn";
div.Controls.Add(btnEdit);
cell.Controls.Add(div);
rw.Cells.Add(cell);
//---------------------cell--------------
cell = new TableCell();
Panel div2 = new Panel();
div.Style.Add("float", "left");
Button btnDel = new Button();
btnDel.Click += new EventHandler(btnDel_Click);
btnDel.Text = "Изтрий";
btnDel.Style.Add("margin-left", "15px");
btnDel.Style.Add("margin-right", "15px");
btnDel.ID = "Delete" + car.getId().ToString();
btnDel.CssClass = "btn";
div2.Controls.Add(btnDel);
cell.Controls.Add(div2);
rw.Cells.Add(cell);
tbl.Controls.Add(rw);
//------------------row-----------------------
rw = new TableRow();
//---------------------cell--------------
cell = new TableCell();
cell.RowSpan = 5;
cell.Width = 300;
ImageButton img = new ImageButton();
img.ImageUrl = car.getCarImage();
img.Width = 300;
img.Height = 150;
img.Style.Add("min-height", "150px");
img.Style.Add("min-width", "100px");
img.ID = "Img" + car.getId().ToString();
img.ToolTip = "Виж история на автомобила";
img.Click += new ImageClickEventHandler(img_Click);
cell.Controls.Add(img);
rw.Cells.Add(cell);
//---------------------cell--------------
cell = new TableCell();
cell.ColumnSpan = 2;
cell.Style.Add("height", "10px");
Label carInfo = new Label();
carInfo.Font.Size = 10;
carInfo.Text = car.getCarFuel() + ", " + car.getCarEngine() + ", " + car.getCarHPowers() + " к.с., " + car.getCarYear();
cell.Controls.Add(carInfo);
rw.Cells.Add(cell);
//---------------------cell--------------
cell = new TableCell();
cell.ColumnSpan = 4;
//.........这里部分代码省略.........