如何添加一个日历视图
1. 在BOSIDE中打开/新增一张单据,添加一个面板控件[FPanel];
2. 绑定构建插件;
3. 构建插件中,修改该面板FPanel的xtype类型,如e.Control["xtype"] = "kdscheduler";
添加自定义按钮
这里贴一个示例代码
private void AddButton()
{
JSONArray jsonButton = new JSONArray();
JSONObject jsonItems = new JSONObject();
jsonItems["ButtonName"] = "btnActivity";
jsonItems["Description"] = Kingdee.BOS.Resource.ResManager.LoadKDString("新增活动", "006023030001112", Kingdee.BOS.Resource.SubSystemType.CRM);
jsonButton.Add(jsonItems);
jsonItems = new JSONObject();
jsonItems["ButtonName"] = "btnContact";
jsonItems["Description"] = Kingdee.BOS.Resource.ResManager.LoadKDString("新增联系人", "006023030001113", Kingdee.BOS.Resource.SubSystemType.CRM);
jsonButton.Add(jsonItems);
jsonItems = new JSONObject();
jsonItems["ButtonName"] = "btnSV";
jsonItems["Description"] = Kingdee.BOS.Resource.ResManager.LoadKDString("新增客户反馈", "006023030001561", Kingdee.BOS.Resource.SubSystemType.CRM);
jsonButton.Add(jsonItems);
jsonItems = new JSONObject();
jsonItems["ButtonName"] = "btnOpp";
jsonItems["Description"] = Kingdee.BOS.Resource.ResManager.LoadKDString("新增商业机会", "006023030001478", Kingdee.BOS.Resource.SubSystemType.CRM);
jsonButton.Add(jsonItems);
this.View.GetControl("FCalendarviewPanel").InvokeControlMethod("AddSubButtonItem", new object[]
{
"btnEvents", Kingdee.BOS.Resource.ResManager.LoadKDString("添加事件", "006023030001114", Kingdee.BOS.Resource.SubSystemType.CRM), jsonButton
}
);
jsonButton = new JSONArray();
jsonItems = new JSONObject();
jsonItems["ButtonName"] = "btnSetting";
jsonItems["Description"] = Kingdee.BOS.Resource.ResManager.LoadKDString("设置", "006023030001115", Kingdee.BOS.Resource.SubSystemType.CRM);
jsonButton.Add(jsonItems);
this.View.GetControl("FCalendarviewPanel").InvokeControlMethod("AddButtonItem", jsonButton);
}
推荐阅读