本文整理汇总了C#中FineUI类的典型用法代码示例。如果您正苦于以下问题:C# FineUI类的具体用法?C# FineUI怎么用?C# FineUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FineUI类属于命名空间,在下文中一共展示了FineUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Grid1_PreRowDataBound
/// <summary>
/// 这个事件会在渲染每一行前调用,因此改变了列的属性,那么渲染每一行时此列的属性都发生了变化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
{
LinkButtonField lbfAction1 = Grid1.FindColumn("lbfAction1") as LinkButtonField;
LinkButtonField lbfAction2 = Grid1.FindColumn("lbfAction2") as LinkButtonField;
CheckBoxField cbxAtSchool = Grid1.FindColumn("cbxAtSchool") as CheckBoxField;
if (e.RowIndex < 5)
{
cbxAtSchool.Enabled = true;
lbfAction1.Enabled = true;
lbfAction2.Enabled = true;
}
else
{
cbxAtSchool.Enabled = false;
lbfAction1.Enabled = false;
lbfAction2.Enabled = false;
}
// 如果绑定到 DataTable,那么这里的 DataItem 就是 DataRowView
HyperLinkField linkField = Grid1.Columns[4] as HyperLinkField;
DataRowView row = e.DataItem as DataRowView;
if (row != null)
{
linkField.DataTextFormatString = "{0} (" + row["EntranceYear"].ToString() + ")";
}
}
示例2: Grid1_PreRowDataBound
//RDFNew.Module.Admin.Flow.Flow_DeployD Tmp_DALD=null ;
protected void Grid1_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
{
//LinkButtonField lkbDeploy = Grid1.FindColumn("lkbSubmit") as LinkButtonField;
//lkbDeploy.Enabled =false ;
//DataRowView row = e.DataItem as DataRowView;
//if (row != null)
//{
// DS.XBPM.API.ProcessInstance ins = App_Com.FlowHelper.Engine.GetExecutionService().FindProcessInstance(row.Row["InstanceID"].ToString());
// if (ins != null)
// {
// string[] curActNames = ins.FindActiveExecutionNames();
// for (int j = 0; j < curActNames.Length; j++)
// {
// string act = curActNames[j];
// if (Tmp_DALD == null)
// Tmp_DALD = new RDFNew.Module.Admin.Flow.Flow_DeployD();
// string owner = Tmp_DALD.GetActivityOwner(ins.DeploymentId, ins.ProcessName, act);
// if (owner.ToUpper() == "APPLICANT" && row.Row["CrtBy"].ToString() == App_Com.Sys_User.GetUserInfo("UserID"))
// {
// lkbDeploy.Enabled = true;
// break;
// }
// if (owner == App_Com.Sys_User.GetUserInfo("UserID"))
// {
// lkbDeploy.Enabled = true;
// break;
// }
// }
// }
//}
}
示例3: AddNode
/// <summary>
/// 添加子节点
/// </summary>
/// <param name="dt"></param>
/// <param name="node"></param>
/// <param name="nodeid"></param>
public int AddNode(DataTable dt, FineUI.TreeNode node, string nodeid)
{
//筛选出当前节点下面的子节点
var childdt = DataTableHelper.GetFilterData(dt, BranchTable.ParentId, nodeid, BranchTable.Sort, "Asc");
//判断是否有节点存在
if (childdt.Rows.Count > 0)
{
foreach (DataRow item in childdt.Rows)
{
//bool ispage = int.Parse(item[MenuInfo.Columns.MenuInfo_IsMenu].ToString()) == 0 ? false : true;
var tnode = new FineUI.TreeNode();
//设置节点名称
tnode.Text = item[BranchTable.Name].ToString();
//设置节点ID
tnode.NodeID = item[BranchTable.Id].ToString();
//是否自动扩大
tnode.Expanded = true;
//if (!TreeMenu.Nodes.Contains(tnode))
node.Nodes.Add(tnode);
//递归添加子节点
int count = AddNode(dt, tnode, item[BranchTable.Id].ToString());
//判断当前节点是否为最终节点
if (count == 0)
{
tnode.Leaf = true;
}
tnode.EnableClickEvent = true;
}
}
return childdt.Rows.Count;
}
示例4: Grid1_RowCommand
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e)
{
if (e.CommandName == "Action1" || e.CommandName == "Action2")
{
labResult.Text = String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName);
}
}
示例5: Grid1_RowCommand
/// <summary>
/// Grid点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e)
{
GridRow gr = Grid1.Rows[e.RowIndex];
//获取主键ID
var id = ConvertHelper.Cint0(gr.DataKeys[0].ToString());
//获取在线用户实体
var model = OnlineUsersBll.GetInstence().GetModelForCache(id);
if (model == null)
return;
switch (e.CommandName)
{
case "GetOut":
//从在线表中删除用户
OnlineUsersBll.GetInstence().UserExit(this, model.UserHashKey);
//刷新当前页面
FineUI.PageContext.Refresh();
break;
case "ManagerColumn":
Window1.IFrameUrl = "../../Employees/ManagerView.aspx?Id=" + model.Manager_Id + "&" + MenuInfoBll.GetInstence().PageUrlEncryptStringNoKey(model.Manager_Id + "");
Window1.Hidden = false;
break;
case "LoginLog":
Window1.IFrameUrl = "LoginLogList.aspx?Id=" + model.Manager_Id + "&" + MenuInfoBll.GetInstence().PageUrlEncryptStringNoKey(model.Manager_Id + "");
Window1.Hidden = false;
break;
case "UserLog":
Window1.IFrameUrl = "UseLogList.aspx?Id=" + model.Manager_Id + "&" + MenuInfoBll.GetInstence().PageUrlEncryptStringNoKey(model.Manager_Id + "");
Window1.Hidden = false;
break;
}
}
示例6: Grid1_Sort
protected void Grid1_Sort(object sender, FineUI.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
示例7: gridStatistic3_RowDataBound
protected void gridStatistic3_RowDataBound(object sender, FineUI.GridRowEventArgs e)
{
if (e.DataItem != null)
{
Ticket ticket = e.DataItem as Ticket;
IList<ActivityTicketAssign> listTa = ta.GetActivityAssignForTicket(ticket.ProductCode).ToList();
int Amount = 0;
foreach (var ata in listTa)
{
Amount += ata.SoldAmount;
}
ticketSolidTotal += Amount;
Literal laSolidAmount = gridStatistic3.Rows[e.RowIndex].FindControl("laTicketSolidAmount") as Literal;
laSolidAmount.Text = Amount.ToString();
Literal laCheckAmount = gridStatistic3.Rows[e.RowIndex].FindControl("laTicketCheckAmount") as Literal;
int checkAmount = 0;
IList<TicketAssign> listTicketAssign = bllOd.GetTaForIdCardInActivity(ta.ActivityCode, ticket.Id);
foreach (var item in listTicketAssign)
{
checkAmount++;
}
ticketCheckTotal += checkAmount;
laCheckAmount.Text = checkAmount.ToString();
}
}
示例8: BindGrid
/// <summary>
/// 绑定Grid表格,并实现分页
/// </summary>
/// <param name="grid">表格控件</param>
/// <param name="pageIndex">第几页</param>
/// <param name="pageSize">每页显示记录数量</param>
/// <param name="wheres">查询条件</param>
/// <param name="sorts">排序</param>
public override void BindGrid(FineUI.Grid grid, int pageIndex = 0, int pageSize = 0, List<ConditionHelper.SqlqueryCondition> wheres = null, List<string> sorts = null)
{
//用于统计执行时长(耗时)
var swatch = new Stopwatch();
swatch.Start();
try {
// 1.设置总项数
grid.RecordCount = GetRecordCount(wheres);
// 2.如果不存在记录,则清空Grid表格
if (grid.RecordCount == 0) {
grid.Rows.Clear();
// 查询并绑定到Grid
grid.DataBind();
grid.AllowPaging = false;
}
else
{
//3.查询并绑定到Grid
grid.DataSource = GetDataTable(false, 0, null, pageIndex, pageSize, wheres, sorts);
grid.DataBind();
}
}
catch (Exception e) {
// 记录日志
CommonBll.WriteLog("获取用户操作日志表记录时出现异常", e);
}
// 统计结束
swatch.Stop();
// 计算查询数据库使用时间,并存储到Session里,以便UI显示
HttpContext.Current.Session["SpendingTime"] = (swatch.ElapsedMilliseconds / 1000.00).ToString();
}
示例9: BandDropDownListShowMenu
/// <summary>
/// 绑定菜单下拉列表——只显示所有可以显示的菜单(IsMenu)
/// </summary>
public void BandDropDownListShowMenu(Page page, FineUI.DropDownList ddl)
{
//在内存中筛选记录
var dt = DataTableHelper.GetFilterData(GetDataTable(), string.Format("{0}={1}", MenuInfoTable.IsMenu, 0), MenuInfoTable.Depth + ", " + MenuInfoTable.Sort);
try
{
//整理出有层次感的数据
dt = DataTableHelper.DataTableTidyUp(dt, MenuInfoTable.Id, MenuInfoTable.ParentId, 0);
ddl.EnableSimulateTree = true;
//显示值
ddl.DataTextField = MenuInfoTable.Name;
//显示key
ddl.DataValueField = MenuInfoTable.Id;
//数据层次
ddl.DataSimulateTreeLevelField = MenuInfoTable.Depth;
//绑定数据源
ddl.DataSource = dt;
ddl.DataBind();
ddl.SelectedIndex = 0;
ddl.Items.Insert(0, new FineUI.ListItem("请选择菜单", "0"));
ddl.SelectedValue = "0";
}
catch (Exception e)
{
// 记录日志
CommonBll.WriteLog("", e);
}
}
示例10: authorityGrid_RowDataBound
protected void authorityGrid_RowDataBound(object sender, FineUI.GridRowEventArgs e)
{
var chkAuthority = authorityGrid.Rows[e.RowIndex].FindControl("chkAuthority") as System.Web.UI.WebControls.CheckBoxList;
dynamic row = e.DataItem as dynamic;
if (row != null)
{
var id = row.Id;
chkAuthority.DataSource = permissions.Where(m => m.ModuleId == id).ToList();
chkAuthority.DataValueField = "Id";
chkAuthority.DataTextField = "Name";
chkAuthority.DataBind();
foreach (System.Web.UI.WebControls.ListItem item in chkAuthority.Items)
{
var itemId = item.Value;
if (currentPermissions.Exists(m => m.Id == itemId))
{
item.Selected = true;
}
else
{
item.Selected = false;
}
}
}
}
示例11: Grid1_Sort
protected void Grid1_Sort(object sender, FineUI.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortColumnIndex = e.ColumnIndex;
BindGrid();
}
示例12: itemlist_RowClick
protected void itemlist_RowClick(object sender, FineUI.GridRowClickEventArgs e)
{
object[] rowDataKeys = itemlist.DataKeys[e.RowIndex];
if (rowDataKeys.Length < 1) return;
var list = SerNoCaller.Calr_ConsignmentOrder.Get(" select * from T_ERP_ConsignmentOrder where CheckNo = @0 ", rowDataKeys[1].ToString());
Ords.DataSource = list;
Ords.DataBind();
}
示例13: Grid1_PageIndexChange
protected void Grid1_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
SyncSelectedRowIndexArrayToHiddenField();
Grid1.PageIndex = e.NewPageIndex;
UpdateSelectedRowIndexArray();
}
示例14: gridTicketOwner_RowCommand
protected void gridTicketOwner_RowCommand(object sender, FineUI.GridCommandEventArgs e)
{
if (e.CommandName == "select")
{
Session["OwnerTicket"] = (gridTicketOwner.DataKeys[e.RowIndex][0] + "," + gridTicketOwner.DataKeys[e.RowIndex][1] + "," + gridTicketOwner.DataKeys[e.RowIndex][2]);
lblOwnerScenic.Text = gridTicketOwner.DataKeys[e.RowIndex][2].ToString() + "-" + gridTicketOwner.DataKeys[e.RowIndex][1].ToString();
}
}
示例15: gridOwner_RowCommand
protected void gridOwner_RowCommand(object sender, FineUI.GridCommandEventArgs e)
{
if (e.CommandName == "select")
{
Session["OwnerScenic"] = gridOwner.DataKeys[e.RowIndex][0];
lblOwnerScenic.Text = gridOwner.DataKeys[e.RowIndex][0].ToString();
}
}