极至框架Jz学习笔记
设计的数据库表名:
Select * from jzmetadata_dataentity
数据库表列名:
Select * from jzmetadata_dataentitycol
仓库设置:系统后台配置-》进销存配置->仓库设置
物料:供应链采购管理-》采购主数据-》物料主数据-》物料新增
组织机构:系统后台配置->系统初始配置-》组织机构
UI 设计
实体
基础资料-》基础资料_ERP_进销存-》物料
表名:jzMat 实体:Mat
表格-》下拉列表框过滤
void gridCusomter_AfterCellActivate(object sender, EventArgs e)
{
gridCusomter.AutoDropdownListFilter = "";//如果有多列的话,这里设置为空
if (gridCusomter.ActiveCell.Column.Key == "RefUnitID")
{
//只能选择客户的往来单位
gridCusomter.AutoDropdownListFilter = string.Format("IsCustomer=1");
}
}
系统后台配置-》系统维护配置-》基础资料业务编码规范表-》基础资料业务编码规范表。
执行Sql
Jeez.Core.NativeQueryCommand cmdsq;
Jeez.Core.INativeQuery quarySQ = Jeez.Login.RemoteCall.GetNativeQuery();
cmdsq = new NativeQueryCommand();
cmdsq.CommandText = sbUpdate.ToString();
try
{
quarySQ.ExecuteNonQuery(objContext.ConnectionString, cmdsq);
Jeez.Common.UI.MsgBox.Show("订单数量,入库数量更新成功");
}
catch (Exception ex)
{
Jeez.Common.UI.MsgBox.Show(ex.Message.ToString());
}
对话框:
Jeez.Common.UI.MsgBox.Show("没有审核的单不能打印!");
表格中获取选择列的实体ID
EntityObject eoMat = base.GetRefEntityObjectByGridEntityCol(gridZY, e.Cell.Row.Cells[MAT_ID]);
int matId = Convert.ToInt32(eoMat.GetProperty("ID"));
JeezGrid 表格操作
foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in f.CurrentGrid.Selected.Rows)
{//遍历选择的行
strBZ.Append(row.Cells["Name"].Value.ToString() + " ");
}
//设置当前行单元格的值
this.gridZY.ActiveRow.Cells["Model"].Value = strBZ.ToString();
// 摘要:
// 表格列更新后事件
public new event CellEventHandler AfterCellUpdate;
//
// 摘要:
// 表格列按钮单击事件
public new event CellEventHandler ClickCellButton;
常属性方法
UltraGridRow currentRow = gridZY.ActiveRow;//当前行
var selectedRows = gridZY.Selected.Rows;//已选择的行
var primaryKeyName = gridZY.PrimaryKeyName;//主键
var dataSource = gridZY.Data.Tables[0];//数据源
int indexRow = gridZY.CurrentRowIndex;//当前行索引
gridZY.NoEdit = false;//禁止编辑
gridZY.Columns[primaryKeyName].Visible = false;//列集合
gridZY.DeleteRow(3);//删除行
gridZY.InsertRow(1);//插入行
gridZY.UpdateRow(3, dataSource.NewRow());//更新行
调用窗体 ShowForm
FolyerERP.Jiance.JCItemList f = base.ShowForm(ERPEntityFormIDEnum.产品检验项目一览表3, null) as FolyerERP.Jiance.JCItemList; f.FormClosing += new FormClosingEventHandler(fBZ_FormClosing);
当窗体关闭时获取子窗体的结果
void fBZ_FormClosing(object sender, FormClosingEventArgs e)
{
FolyerERP.Jiance.JCItemList f = sender as FolyerERP.Jiance.JCItemList;
foreach (Infragistics.Win.UltraWinGrid.UltraGridRow row in f.CurrentGrid.Selected.Rows)
{
strBZ.Append(row.Cells["Name"].Value.ToString() + " ");
}
this.gridZY.ActiveRow.Cells["Model"].Value = strBZ.ToString();
}
表单设计对应的基类:
通用表单设计:Jeez.Runtime.Base.General.GeneralUI
浙公网安备 33010602011771号