本文整理汇总了C#中LinkButton类的典型用法代码示例。如果您正苦于以下问题:C# LinkButton类的具体用法?C# LinkButton怎么用?C# LinkButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LinkButton类属于命名空间,在下文中一共展示了LinkButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = Pos_TransactionTypeManager.DeletePos_TransactionType(Convert.ToInt32(linkButton.CommandArgument));
showPos_TransactionTypeGrid();
}
示例2: ClassInitialize
public void ClassInitialize()
{
link = new LinkButton("My Link Button");
link.Width = 120;
TestHarness.AddControl(link);
link.Model.Click += delegate { Log.Info("!! Click"); };
}
示例3: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = ACC_JournalMasterManager.DeleteACC_JournalMaster(Convert.ToInt32(linkButton.CommandArgument));
showACC_JournalMasterGrid();
}
示例4: DisableControls
private void DisableControls(Control gv)
{
LinkButton lb = new LinkButton();
Literal l = new Literal();
string name = String.Empty;
for (int i = 0; i < gv.Controls.Count; i++)
{
if (gv.Controls[i].GetType() == typeof(LinkButton))
{
l.Text = (gv.Controls[i] as LinkButton).Text;
gv.Controls.Remove(gv.Controls[i]);
gv.Controls.AddAt(i, l);
}
else if (gv.Controls[i].GetType() == typeof(DropDownList))
{
l.Text = (gv.Controls[i] as DropDownList).SelectedItem.Text;
gv.Controls.Remove(gv.Controls[i]);
gv.Controls.AddAt(i, l);
}
if (gv.Controls[i].HasControls())
{
DisableControls(gv.Controls[i]);
}
}
}
示例5: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = AbsendSalaryDiductionManager.DeleteAbsendSalaryDiduction(Convert.ToInt32(linkButton.CommandArgument));
showAbsendSalaryDiductionGrid();
}
示例6: CreateButtons
void CreateButtons()
{
SqlConnection con = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=scrapbook;Integrated Security=True");
SqlCommand cmd1 = new SqlCommand("select * from scrapbook where recieverid='" + Session["userid"].ToString() + "'", con);
SqlDataAdapter da1 = new SqlDataAdapter();
da1.SelectCommand = cmd1;
DataSet ds1 = new DataSet();
da1.Fill(ds1, "scrapbook");
for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
{
LinkButton btn = new LinkButton();
SqlDataAdapter da2 = new SqlDataAdapter("select * from login where userid='" + ds1.Tables[0].Rows[i]["senderid"].ToString() + "'", con);
DataSet ds2 = new DataSet();
da2.Fill(ds2);
// name = ds2.Tables[0].Rows[0]["username"].ToString();
btn.Text =ds2.Tables[0].Rows[0]["username"].ToString();
btn.ID = ds2.Tables[0].Rows[0]["userid"].ToString();
btn.CssClass = "username";
usr.Controls.Add(btn);
// dynamiclink.Visible = true;
btn.Click += new EventHandler(btn_Click);
}
// }
}
示例7: RadGrid1_ItemCreated
public void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridCommandItem)
{
GridCommandItem commandItem = (e.Item as GridCommandItem);
PlaceHolder container = (PlaceHolder)commandItem.FindControl("PlaceHolder1");
Label label = new Label();
label.Text = " ";
container.Controls.Add(label);
for (int i = 65; i <= 65 + 25; i++)
{
LinkButton linkButton1 = new LinkButton();
LiteralControl lc = new LiteralControl(" ");
linkButton1.Text = "" + (char)i;
linkButton1.CommandName = "alpha";
linkButton1.CommandArgument = "" + (char)i;
container.Controls.Add(linkButton1);
container.Controls.Add(lc);
}
LiteralControl lcLast = new LiteralControl(" ");
container.Controls.Add(lcLast);
LinkButton linkButtonAll = new LinkButton();
linkButtonAll.Text = "Tất cả";
linkButtonAll.CommandName = "NoFilter";
container.Controls.Add(linkButtonAll);
}
}
示例8: setTable
protected void setTable()
{
DataTable myDataTable = new DataTable();
JobsModule myJobsModule = new JobsModule();
myJobsModule.setUserId((String)Session["userId"]);
myDataTable = myJobsModule.getEmployersJobPositions().Copy();
myDataTable.Columns.Add("Delete", typeof(String)).SetOrdinal(0);
myDataTable.Columns.Add("List of Applied Applicants", typeof(String)).SetOrdinal(4);
JobPositionsGridView.DataSource = myDataTable;
JobPositionsGridView.DataBind();
foreach (GridViewRow row in JobPositionsGridView.Rows)
{
LinkButton lb = new LinkButton();
lb.Text = "Delete";
lb.Click += new EventHandler(LinkButtonClicked);
row.Cells[0].Controls.Add(lb);
HyperLink hp = new HyperLink();
hp.Text = row.Cells[2].Text;
hp.NavigateUrl = "~/ShowJobPositionsManager.aspx?pId=" + row.Cells[1].Text;
row.Cells[2].Controls.Add(hp);
HyperLink hp2 = new HyperLink();
hp2.Text = "Show Applied Applicants";
hp2.NavigateUrl = "~/ListOfAppliedApplicants.aspx?pId=" + row.Cells[1].Text;
row.Cells[4].Controls.Add(hp2);
}
}
示例9: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = MenuRoleManager.DeleteMenuRole(Convert.ToInt32(linkButton.CommandArgument));
showMenuRoleGrid();
}
示例10: dlBind
/// <summary>
/// DataList控件绑定及分页
/// </summary>
/// <param name="intCount">每页显示的记录条数</param>
/// <param name="ds">DataSet数据集</param>
/// <param name="labPage">当前页码</param>
/// <param name="labTPage">总页码</param>
/// <param name="lbtnUp">上一页</param>
/// <param name="lbtnNext">下一页</param>
/// <param name="lbtnBack">最后一页</param>
/// <param name="lbtnOne">第一页</param>
/// <param name="dl">DataList控件对象</param>
public static void dlBind(int intCount, DataSet ds, Label labPage, Label labTPage, LinkButton lbtnUp, LinkButton lbtnNext, LinkButton lbtnBack, LinkButton lbtnOne, Repeater dl)
{
int curpage = Convert.ToInt32(labPage.Text);
PagedDataSource ps = new PagedDataSource();
ps.DataSource = ds.Tables[0].DefaultView;
ps.AllowPaging = true; //是否可以分页
ps.PageSize = intCount; //显示的数量
ps.CurrentPageIndex = curpage - 1; //取得当前页的页码
lbtnNext.Visible = true;
lbtnOne.Visible = true;
lbtnBack.Visible = true;
lbtnUp.Visible = true;
lbtnNext.Enabled = true;
lbtnBack.Enabled = true;
lbtnOne.Enabled = true;
if (curpage == 1)
{
lbtnOne.Visible = false;//不显示第一页按钮
lbtnUp.Visible = false;//不显示上一页按钮
}
if (curpage == ps.PageCount)
{
lbtnNext.Visible = false;//不显示下一页
lbtnBack.Visible = false;//不显示最后一页
}
labTPage.Text = Convert.ToString(ps.PageCount);
dl.DataSource = ps;
// dl.DataKeyField = "ID";
dl.DataBind();
}
示例11: DrawPages
public void DrawPages()
{
PagesRow.Controls.Clear();
int start = 0;
if (Pages <= 1)
return;
while (start < Pages)
{
TableCell cell = new TableCell();
LinkButton link = new LinkButton();
link.ID = "Link" + start.ToString();
link.Text = (start + 1).ToString();
link.Click += new EventHandler(link_Click);
if (start == CurrentPage)
{
link.BorderStyle = BorderStyle.Solid;
link.BorderColor = Color.Red;
link.BorderWidth = Unit.Pixel(1);
}
cell.Controls.Add(link);
PagesRow.Controls.Add(cell);
start++;
}
}
示例12: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = Inv_QuantityUnitManager.DeleteInv_QuantityUnit(Convert.ToInt32(linkButton.CommandArgument));
showInv_QuantityUnitGrid();
}
示例13: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = ACC_ChartOfAccountLabel3Manager.DeleteACC_ChartOfAccountLabel3(Convert.ToInt32(linkButton.CommandArgument));
showACC_ChartOfAccountLabel3Grid();
}
示例14: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = Pos_BranchWiseProductStockCapacityManager.DeletePos_BranchWiseProductStockCapacity(Convert.ToInt32(linkButton.CommandArgument));
showPos_BranchWiseProductStockCapacityGrid();
}
示例15: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton = (LinkButton)sender;
bool result = Pos_ProductStatusManager.DeletePos_ProductStatus(Convert.ToInt32(linkButton.CommandArgument));
showPos_ProductStatusGrid();
}