/// <summary> /// 修改资产负债表计算公式 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool UpdateFormulaDetails(FormulaDetailsModel model) { try { return FormulaDetailsDBHelper.UpdateFormulaDetails(model); } catch (Exception ex) { throw ex; } }
/// <summary> /// 添加资产负债表公式明细 /// </summary> /// <param name="model"></param> /// <param name="IntID"></param> /// <returns></returns> public static bool InsertFormulaDetails(FormulaDetailsModel model) { StringBuilder strSql = new StringBuilder(); strSql.AppendLine("insert into officedba.FormulaDetails("); strSql.AppendLine("FormulaID,SubjectsCD,SubjectsName,Operator,Direction,CompanyCD)"); strSql.AppendLine(" values ("); strSql.AppendLine("@FormulaID,@SubjectsCD,@SubjectsName,@Operator,@Direction,@CompanyCD)"); SqlParameter[] parms = new SqlParameter[6]; parms[0] = SqlHelper.GetParameter("@FormulaID", model.FormulaID); parms[1] = SqlHelper.GetParameter("@SubjectsCD", model.SubjectsCD); parms[2] = SqlHelper.GetParameter("@SubjectsName", model.SubjectsName); parms[3] = SqlHelper.GetParameter("@Operator", model.Operator); parms[4] = SqlHelper.GetParameter("@Direction", model.Direction); parms[5] = SqlHelper.GetParameter("@CompanyCD", model.CompanyCD); SqlHelper.ExecuteTransSql(strSql.ToString(), parms); return SqlHelper.Result.OprateCount > 0 ? true : false; }
/// <summary> /// 修改资产负债表计算公式 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool UpdateFormulaDetails(FormulaDetailsModel model) { StringBuilder strSql = new StringBuilder(); strSql.AppendLine("update officedba.FormulaDetails set "); strSql.AppendLine("FormulaID=@FormulaID,"); strSql.AppendLine("SubjectsCD=@SubjectsCD,"); strSql.AppendLine("SubjectsName=@SubjectsName,"); strSql.AppendLine("Operator=@Operator,"); strSql.AppendLine("Direction=@Direction,"); strSql.AppendLine(" where ID=@ID"); SqlParameter[] parms = new SqlParameter[6]; parms[0] = SqlHelper.GetParameter("@FormulaID", model.FormulaID); parms[1] = SqlHelper.GetParameter("@SubjectsCD", model.SubjectsCD); parms[2] = SqlHelper.GetParameter("@SubjectsName", model.SubjectsName); parms[3] = SqlHelper.GetParameter("@Operator", model.Operator); parms[4] = SqlHelper.GetParameter("@Direction", model.Direction); parms[5] = SqlHelper.GetParameter("@ID", model.ID); SqlHelper.ExecuteTransSql(strSql.ToString(), parms); return SqlHelper.Result.OprateCount > 0 ? true : false; }