本文整理汇总了C#中SMT.SaaS.FrameworkUI.ToolbarItem类的典型用法代码示例。如果您正苦于以下问题:C# ToolbarItem类的具体用法?C# ToolbarItem怎么用?C# ToolbarItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ToolbarItem类属于SMT.SaaS.FrameworkUI命名空间,在下文中一共展示了ToolbarItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
if (formType != FormTypes.Browse && formType != FormTypes.Audit)
{
if (!isAlterTrave)//修改行程不需显示
{
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
}
}
if (Master_Golbal!=null&&
Master_Golbal.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString()
&& formType==FormTypes.Edit)
{
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "3",
Title = "删除",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
};
items.Add(item);
}
return items;
}
示例2: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = "保存",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "1",
Title = "保存并关闭",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
};
items.Add(item);
items.Clear();
return items;
}
示例3: GetToolBarItems
/// <summary>
/// 设置工具栏按钮
/// </summary>
/// <param name="arr"></param>
/// <returns></returns>
public static List<ToolbarItem> GetToolBarItems(ref object[,] arr)
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item;
for (int i = 0; i < arr.GetLength(0); i++)
{
item = new ToolbarItem
{
DisplayType = (ToolbarItemDisplayTypes)arr[i, 0],
Key = (string)arr[i, 1],
Title = Utility.GetResourceStr((string)arr[i, 2]),
ImageUrl = (string)arr[i, 3]
};
items.Add(item);
}
return items;
}
示例4: InitToolBar
private void InitToolBar()
{
List<ToolbarItem> list = new List<ToolbarItem>();
list.Add(ToolBarItems.Save);
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "CheckBudget",
Title = "预算结算",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
list.Add(item);
tooBarTop.InitToolBarItem(list);
tooBarTop.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(tooBarTop_ItemClicked);
}
示例5: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "1",
Title = Utility.GetResourceStr("SAVEANDCLOSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
return items;
}
示例6: InitToolBar
private void InitToolBar()
{
List<ToolbarItem> list = new List<ToolbarItem>();
ToolbarItem item = ToolBarItems.Save;
list.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "AddType",
Title = "添加科目类型",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
list.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "AddSubject",
Title = "添加同级科目",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
list.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "AddSubSubject",
Title = "添加子级科目",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
list.Add(item);
item = ToolBarItems.Delete;
list.Add(item);
tooBarTop.InitToolBarItem(list);
tooBarTop.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(tooBarTop_ItemClicked);
}
示例7: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()//代码隐藏实现按钮加载
{
List<ToolbarItem> items = new List<ToolbarItem>();
if (FormTypesAction != FormTypes.Browse && FormTypesAction != FormTypes.Audit && FormTypesAction != FormTypes.Resubmit)
{
if (FormTypesAction != FormTypes.New && BorrowMasterEntity.CHECKSTATES == 0)
{
items.Add(ToolBarItems.Delete);
}
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
}
return items;
}
示例8: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
if (formType != FormTypes.Browse && formType != FormTypes.Audit)
{
//ToolbarItem item = new ToolbarItem
//{
// DisplayType = ToolbarItemDisplayTypes.Image,
// Key = "1",
// Title = Utility.GetResourceStr("SAVEANDCLOSE"),
// ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
//};
//items.Add(item);
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
}
if (TravelReimbursement_Golbal!=null
&&TravelReimbursement_Golbal.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString()
&& formType==FormTypes.Edit)
{
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "3",
Title = "删除",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
};
items.Add(item);
}
return items;
}
示例9: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("CANCELMEETINGCONFIRM"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/18_audit.png"
};
items.Add(item);
return items;
}
示例10: CreateFormEditButton
private List<ToolbarItem> CreateFormEditButton()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
return items;
}
示例11: CreateFormEditButton
private List<ToolbarItem> CreateFormEditButton()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "1",
Title = Utility.GetResourceStr("CLOSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_Close.png"
};
items.Add(item);
//item = new ToolbarItem
//{
// DisplayType = ToolbarItemDisplayTypes.Image,
// Key = "5",
// Title = "提交审核",
// ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
//};
//items.Add(item);
//item = new ToolbarItem
//{
// DisplayType = ToolbarItemDisplayTypes.Image,
// Key = "6",
// Title = "审核",//"审核"
// ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
//};
//items.Add(item);
//item = new ToolbarItem
//{
// DisplayType = ToolbarItemDisplayTypes.Image,
// Key = "7",
// Title = "审核不通过",//"审核不通过"
// ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png"
//};
//items.Add(item);
return items;
}
示例12: OnLoadControlComplete
protected override void OnLoadControlComplete()
{
base.OnLoadControlComplete();
DetailGrid grid = this.EditForm.FindControl("OrderGrid") as DetailGrid;
if (grid != null)
{
grid.P1.Visibility = System.Windows.Visibility.Visible;
List<ToolbarItem> list = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "S1",
Title = "按科目查看",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png",
};
list.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "S2",
Title = "按公司部门单据查看",
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
list.Add(item);
grid.AddToolBarItems(list);
}
var dGrid = grid;
dGrid.ADGrid.LoadingRow += (object sender, DataGridRowEventArgs e) =>
{
if ((this.EditForm.OperationType == OperationTypes.Add
|| this.EditForm.OperationType == OperationTypes.Edit
|| this.EditForm.OperationType == OperationTypes.ReSubmit) && SumType == 1)
{
var con = dGrid.ADGrid.Columns[7].GetCellContent(e.Row) as StackPanel;
Action a2 = () =>
{
Label label = new Label();
label.Content = "已打回";
con.Children.Clear();
con.Children.Add(label);
};
Action a1 = () =>
{
ImageButton myButton = new ImageButton();
myButton.Margin = new Thickness(0);
myButton.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", "打回");
myButton.Tag = e.Row.DataContext;
myButton.Click += (oo, ee) =>
{
Control c = oo as Control;
var entity = c.Tag as FBEntity;
Action action = () =>
{
// dGrid.Delete(new List<FBEntity> { entity });
var saveEntity = entity.Entity.ToFBEntity();
saveEntity.SetObjValue("Entity.CHECKSTATES", 4);
saveEntity.FBEntityState = FBEntityState.Modified;
FBEntityService fbs = new FBEntityService();
fbs.SetVisitUser(saveEntity);
fbs.FBService.SaveCompleted += (ooo, eee) =>
{
this.CloseProcess();
if (eee.Error != null)
{
CommonFunction.ShowErrorMessage("操作失败, " + eee.Error.Message);
}
else if (eee.Result.Exception != null)
{
CommonFunction.ShowErrorMessage(eee.Result.Exception);
}
else
{
a2();
}
};
this.ShowProcess();
CurrentUserPost user = new CurrentUserPost();
user.EmployeeName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
user.EmployeeID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
user.PostName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName;
user.DepartmentName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName;
user.CompanyName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
fbs.FBService.SaveAsync(saveEntity,user);
// none;
};
var personName = entity.GetObjValue("Entity.T_FB_DEPTBUDGETAPPLYMASTER.OWNERDEPARTMENTNAME");
var msg = "你确定要打回 [" + personName + "] 的部门月度预算吗?";
CommonFunction.AskDelete(msg, action);
};
con.Children.Clear();
con.Children.Add(myButton);
//.........这里部分代码省略.........
示例13: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("CREATE"),
ImageUrl = "/SMT.HRM.UI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
return items;
}
示例14: CreateFormNewButton
private List<ToolbarItem> CreateFormNewButton()
{
List<ToolbarItem> items = new List<ToolbarItem>();
//ToolbarItem item1 = new ToolbarItem
// {
// DisplayType = ToolbarItemDisplayTypes.Image,
// Key = "2",
// Title = Utility.GetResourceStr("SUBMITAUDIT"),
// ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png"
//};
//item1.ItemClick += new EventHandler<RoutedEventArgs>(item_ItemClick);
//items.Add(item1);
if (formTypeAction != FormTypes.Browse && formTypeAction != FormTypes.Audit)
{
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "1",
//Title = Utility.GetResourceStr("SAVEANDCLOSE"),
Title = Utility.GetResourceStr("SAVEANDCLOSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "3",
Title = Utility.GetResourceStr("CHOOSELICENSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
items.Add(item);
}
return items;
}
示例15: GetToolBarItems
public List<ToolbarItem> GetToolBarItems()
{
List<ToolbarItem> items = new List<ToolbarItem>();
if (formTypeAction == FormTypes.New || formTypeAction == FormTypes.Edit || formTypeAction == FormTypes.Resubmit)
{
ToolbarItem item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "1",
Title = Utility.GetResourceStr("SAVEANDCLOSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_saveClose.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "0",
Title = Utility.GetResourceStr("SAVE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "3",
Title = Utility.GetResourceStr("DELETEHOUSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "2",
Title = Utility.GetResourceStr("CHOOSEHOUSE"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
items.Add(item);
item = new ToolbarItem
{
DisplayType = ToolbarItemDisplayTypes.Image,
Key = "4",
Title = Utility.GetResourceStr("CHOOSEDISTRBUTEOBJECT"),
ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
};
items.Add(item);
}
return items;
}