public JsonResult ADCostAccount_add(string id, string money, string state, string date, string memo)
        {
            ADCostAccount en = new ADCostAccount();
            en.orderID = id;
            en.money = Convert.ToDouble(money);
            en.state = Convert.ToInt32(state);
            en.date = Convert.ToDateTime(date);
            en.memo = memo;

            DaADCostAccount dal = new DaADCostAccount();
            var result = new CustomJsonResult();
            result.Data = dal.add(en);
            return result;
        }
Exemple #2
0
        /// <summary>
        /// 添加结算
        /// </summary>
        /// <param name="en">结算实体</param>
        /// <returns></returns>
        public int add(ADCostAccount en)
        {
            string strSql = "insert into ADCostAccount (orderID, money, state, date, memo) values (@orderID, @money, @state, @date, @memo)";

            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@orderID", en.orderID),
                new SqlParameter("@money", en.money),
                new SqlParameter("@state", en.state),
                new SqlParameter("@date", en.date),
                new SqlParameter("@memo", en.memo)
            };

            int result = SqlHelper.ExecuteNonQuery(BaseHelper.DBConnStr, CommandType.Text, strSql, param);
            return result;
        }