| | |
| | | var outParam1 = new SugarParameter("c_Result", null, true); |
| | | var outParam2 = new SugarParameter("C_MSG", null, true); |
| | | // 使用 SqlSugar 执行存储过程 |
| | | Db.Ado.ExecuteCommand("BEGIN PRC_UPDATE_DAA(:P_WORK_NO,:c_Result,:C_MSG); END;", inputParam1, outParam1, outParam2); |
| | | Db.Ado.ExecuteCommand( |
| | | "BEGIN PRC_UPDATE_DAA(:P_WORK_NO,:c_Result,:C_MSG); END;", |
| | | inputParam1, outParam1, outParam2); |
| | | // 获取输出参数的值 |
| | | int result = int.Parse((string)outParam1.Value); |
| | | string message = outParam2.Value == DBNull.Value ? string.Empty : (string)outParam2.Value; |
| | | var result = int.Parse((string)outParam1.Value); |
| | | var message = outParam2.Value == DBNull.Value |
| | | ? string.Empty |
| | | : (string)outParam2.Value; |
| | | if (result == 1) |
| | | { |
| | | //存储过程失败则事务进行回滚 |
| | | //db.Ado.RollbackTran(); |
| | | throw new Exception(message); |
| | | } |
| | | // 提交事务 |
| | | //db.Ado.CommitTran(); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | throw new NotImplementedException("更新失败"); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | var mesLinkU9_xm = Db.Queryable<MesLinkU9>() |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FProject) |
| | | && x.OrgId == dto.FPrdOrgId |
| | | && x.TableType == "MES_PROJECT").First(); |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FProject) |
| | | && x.OrgId == dto.FPrdOrgId |
| | | && x.TableType == "MES_PROJECT").First(); |
| | | |
| | | if (mesLinkU9 != null) entity.Caa006 = mesLinkU9.MesId; |
| | | if (mesLinkU9_xm != null) entity.Project = Convert.ToInt64(mesLinkU9_xm.MesId); |
| | | if (mesLinkU9_xm != null) |
| | | entity.Project = Convert.ToInt64(mesLinkU9_xm.MesId); |
| | | |
| | | return entity; |
| | | } |
| | |
| | | Iscoupleissue = dto.FIsCoupleIssue, |
| | | FDescription = dto.FDescription, |
| | | TypeB = dto.TypeB |
| | | |
| | | }; |
| | | |
| | | var entity = Db.Queryable<Womcab>() |
| | |
| | | && x.TableType == "MES_ITEMS").First(); |
| | | |
| | | var mesLinkU9_TDL = Db.Queryable<MesLinkU9>() |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FSubstitutedItem) |
| | | && x.OrgId == "1002503270000079" |
| | | && x.TableType == "MES_ITEMS").First(); |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FSubstitutedItem) |
| | | && x.OrgId == "1002503270000079" |
| | | && x.TableType == "MES_ITEMS").First(); |
| | | |
| | | var mesLinkU9_xm = Db.Queryable<MesLinkU9>() |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FProject) |
| | | && x.OrgId == "1002503270000079" |
| | | && x.TableType == "MES_PROJECT").First(); |
| | | .Where(x => x.U9Id == Convert.ToString(dto.FProject) |
| | | && x.OrgId == "1002503270000079" |
| | | && x.TableType == "MES_PROJECT").First(); |
| | | |
| | | if (mesLinkU9 != null) womcab.Cab003 = mesLinkU9.MesId; |
| | | if (mesLinkU9_TDL != null) womcab.Substituteditem = Convert.ToInt64(mesLinkU9_TDL.MesId); |
| | | if (mesLinkU9_TDL != null) |
| | | womcab.Substituteditem = Convert.ToInt64(mesLinkU9_TDL.MesId); |
| | | if (mesLinkU9_xm != null) womcab.Project = mesLinkU9_xm.MesId; |
| | | |
| | | womcabList.Add(womcab); |