예제 #1
0
        /// <summary>
        /// 缴考试费
        /// </summary>
        /// <param name="stuID">学员编号</param>
        /// <param name="money">缴费金额</param>
        /// <param name="remark">备注信息</param>
        /// <returns></returns>
        public bool PayExam(PayExamModel model)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@StudentsID", SqlDbType.BigInt),
                new SqlParameter("@RealPay",    SqlDbType.Decimal),
                new SqlParameter("@Operater",   SqlDbType.VarChar,50),
                new SqlParameter("@Remark",     SqlDbType.VarChar, 200)
            };
            parameters[0].Value = model.StudentsID;
            parameters[1].Value = model.RealPay;
            parameters[2].Value = model.Operater;
            parameters[3].Value = model.Remark;

            StringBuilder strSql = new StringBuilder();

            strSql.Append(@"insert into tb_ExamPay(StudentsID,RealPay,Operater,Remark)
                            values(@StudentsID,@RealPay,@Operater,@Remark)");

            int rows = DriveMgr.Common.SqlHelper.ExecuteNonQuery(DriveMgr.Common.SqlHelper.financialMgrConn, CommandType.Text, strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
        /// <summary>
        /// 缴考试费
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private bool PayExam(HttpContext context)
        {
            PayExamModel model       = new PayExamModel();
            int          id          = Convert.ToInt32(context.Request.Params["payExam_id"]);
            decimal      realpay_pay = Decimal.Parse(context.Request.Params["ui_registration_realpay_payExam"] ?? "0");
            string       remark_pay  = context.Request.Params["ui_registration_remark_payExam"] ?? "";

            model.StudentsID = id;
            model.RealPay    = realpay_pay;
            FormsIdentity             iid     = (FormsIdentity)context.User.Identity;
            FormsAuthenticationTicket tickets = iid.Ticket;

            //获取票证里序列化的用户对象(反序列化)
            DriveMgr.Model.User userCheck = new JavaScriptSerializer().Deserialize <DriveMgr.Model.User>(tickets.UserData);

            model.Operater = userCheck.UserName;

            model.Remark = remark_pay;

            bool result = new DriveMgr.BLL.RegistrationBLL().PayExam(model);

            return(result);
        }
예제 #3
0
 /// <summary>
 /// 缴考试费
 /// </summary>
 /// <param name="stuID">学员编号</param>
 /// <param name="money">缴费金额</param>
 /// <param name="remark">备注信息</param>
 /// <returns></returns>
 public bool PayExam(PayExamModel model)
 {
     return(dal.PayExam(model));
 }