全文预览

K3Cloud7.0插件开发应用案例

上传者:火锅鸡 |  格式:docx  |  页数:9 |  大小:66KB

文档介绍
2:Рa)  自定义收料日志表;Рb)  获取日志的自增长(序列)值;Рc)  执行insert;Р代码如下:РC#Р Рpublic override void AfterExecuteOperationTransaction(AfterExecuteOperationTransaction e)Р{Р    base.AfterExecuteOperationTransaction(e);Р Р    SequenceReader sequence = new SequenceReader(this.Context);Р    int[] ids = (int[])sequence.GetSequence("KDV_stk_ReceiptLog", 1);Р Р    int id = ids[0];Р Р    string sql = " insert into KDV_stk_ReceiptLog(FID, KDV_UserID, KDV_Content) values (@FID, @KDV_UserID, @KDV_Content) ";Р    SqlParam[] sqlParams = new SqlParam[3];Р    sqlParams[0] = new SqlParam("@FID", KDDbType.Int64, id);Р    sqlParams[1] = new SqlParam("@KDV_UserID", KDDbType.Int64, this.Context.UserId);Р    sqlParams[2] = new SqlParam("@KDV_Content", KDDbType.String, "保存");Р Р    DBUtils.Execute(this.Context, sql, sqlParams);Р}

收藏

分享

举报
下载此文档