Exemplo n.º 1
0
 /// <summary>
 ///  修改资产负债表计算公式
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool UpdateBalanceFormula(BalanceFormulaModel model)
 {
     try
     {
         return(BalanceFormulaDBHelper.UpdateBalanceFormula(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 添加资产负债表公式
 /// </summary>
 /// <param name="model"></param>
 /// <param name="IntID"></param>
 /// <returns></returns>
 public static bool InsertBalanceFormula(BalanceFormulaModel model, out int IntID)
 {
     try
     {
         return(BalanceFormulaDBHelper.InsertBalanceFormula(model, out IntID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        ///  修改资产负债表计算公式
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool UpdateBalanceFormula(BalanceFormulaModel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendLine("update officedba.BalanceFormula set ");
            strSql.AppendLine("Name=@Name,");
            strSql.AppendLine("Line=@Line,");

            strSql.AppendLine(" where ID=@ID");

            SqlParameter[] parms = new SqlParameter[3];
            parms[0] = SqlHelper.GetParameter("@Name", model.Name);
            parms[1] = SqlHelper.GetParameter("@Line", model.Line);
            parms[2] = SqlHelper.GetParameter("@ID", model.ID);

            SqlHelper.ExecuteTransSql(strSql.ToString(), parms);
            return(SqlHelper.Result.OprateCount > 0 ? true : false);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 添加资产负债表公式
        /// </summary>
        /// <param name="model"></param>
        /// <param name="IntID"></param>
        /// <returns></returns>
        public static bool InsertBalanceFormula(BalanceFormulaModel model, out int IntID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendLine("insert into officedba.BalanceFormula(");
            strSql.AppendLine("Name,Line)");
            strSql.AppendLine(" values (");
            strSql.AppendLine("@Name,@Line)");
            strSql.AppendLine("set @IntID= @@IDENTITY");
            SqlParameter[] parms = new SqlParameter[3];
            parms[0] = SqlHelper.GetParameter("@Name", model.Name);
            parms[1] = SqlHelper.GetParameter("@Line", model.Line);
            parms[2] = SqlHelper.GetOutputParameter("@IntID", SqlDbType.Int);

            SqlHelper.ExecuteTransSql(strSql.ToString(), parms);
            IntID = Convert.ToInt32(parms[4].Value);
            return(SqlHelper.Result.OprateCount > 0 ? true : false);
        }