Exemple #1
0
        /// <summary>
        /// 添加报名用户
        /// </summary>
        public int AddUserCar(UserCarInfoModel model)
        {
            string strSql = @"insert into MD_ApplyCarInsurance(OrderNo,Type,Usertoken,carInfo,carType,invoicePrice,InsuranceType,FristBeneficiary,agreement,WIE,City,CustomerId,Status,ApplyAge,LoanMoney,RepaymentPeriod)
                                                        values(@OrderNo,@Type,@Usertoken,@carInfo,@carType,@invoicePrice,@InsuranceType,@FristBeneficiary,@agreement,@WIE,@City,@CustomerId,@Status,@ApplyAge,@LoanMoney,@RepaymentPeriod);select @@IDENTITY";

            SqlParameter[] parameters =
            {
                new SqlParameter("@OrderNo",          model.OrderNo),
                new SqlParameter("@Type",             model.Type),
                new SqlParameter("@Usertoken",        model.Usertoken),
                new SqlParameter("@carInfo",          model.carInfo),
                new SqlParameter("@carType",          model.carType),
                new SqlParameter("@invoicePrice",     model.invoicePrice),
                new SqlParameter("@InsuranceType",    model.InsuranceType),
                new SqlParameter("@FristBeneficiary", model.FristBeneficiary),
                new SqlParameter("@agreement",        model.agreement),
                new SqlParameter("@WIE",              model.WIE),
                new SqlParameter("@City",             model.City),
                new SqlParameter("@CustomerId",       model.CustomerId),
                new SqlParameter("@Status",           model.Status),
                new SqlParameter("@ApplyAge",         model.ApplyAge),
                new SqlParameter("@LoanMoney",        model.LoanMoney),
                new SqlParameter("@RepaymentPeriod",  model.RepaymentPeriod)
            };
            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Exemple #2
0
 /// <summary>
 /// 添加报名用户
 /// </summary>
 public int AddUserCar(UserCarInfoModel model)
 {
     return(dal.AddUserCar(model));
 }