/// <summary> /// 更新辅助数据项信息 /// </summary> /// <param name="Model">辅助数据项实体</param> /// <returns></returns> public bool UpdateAdditionalItem(AdditionalItemModel Model) { try { return additionalItemDBHelper.UpdateAdditionalItem(Model); } catch (Exception ex) { throw ex; } }
/// <summary> /// 更新辅助数据项信息 /// </summary> /// <param name="Model">辅助数据项实体</param> /// <returns></returns> public bool UpdateAdditionalItem(AdditionalItemModel Model) { StringBuilder sql = new StringBuilder(); sql.AppendLine("update officedba.AdditionalItem set "); sql.AppendLine(" DuringDate=@DuringDate,ItemName=@ItemName,Line=@Line,CurrentAmount=@CurrentAmount,"); sql.AppendLine(" PreAmount=@PreAmount,CompanyCD=@CompanyCD "); sql.AppendLine(" where ID=@ID"); SqlParameter[] parms = new SqlParameter[7]; parms[0] = SqlHelper.GetParameter("@DuringDate", Model.DuringDate); parms[1] = SqlHelper.GetParameter("@ItemName", Model.ItemName); parms[2] = SqlHelper.GetParameter("@Line", Model.Line); parms[3] = SqlHelper.GetParameter("@CurrentAmount", Model.CurrentAmount); parms[4] = SqlHelper.GetParameter("@PreAmount", Model.PreAmount); parms[5] = SqlHelper.GetParameter("@CompanyCD", Model.CompanyCD); parms[6] = SqlHelper.GetParameter("@ID", Model.ID); SqlHelper.ExecuteTransSql(sql.ToString(), parms); return SqlHelper.Result.OprateCount > 0 ? true : false; }