public ActionResult SaveRecord(string keyValue, TwoTicketRecordEntity record)
 {
     try
     {
         threepeoplecheckbll.InsertRecord(record);
         return(Success("操作成功"));
     }
     catch (Exception ex)
     {
         return(Error(ex.Message));
     }
 }
Beispiel #2
0
        /// <summary>
        /// 插入票据处理记录
        /// </summary>
        /// <param name="record">记录对象</param>
        /// <param name="user">当前用户</param>
        /// <returns></returns>
        public int InsertRecord(TwoTicketRecordEntity record)
        {
            int count = 0;
            var res   = DbFactory.Base().BeginTrans();

            try
            {
                res.ExecuteBySql(string.Format("delete from XLD_TWOTICKETRECORD where ticketId='{0}' and status='{1}'", record.TicketId, record.Status));
                count = res.ExecuteBySql(string.Format(@"insert into XLD_TWOTICKETRECORD(id,hearuser,hearuserid,time,remark,createdate,createuser,createuserid,ticketid,status,IsCommit)
            values('{0}','{1}','{2}',to_date('{3}','yyyy-mm-dd hh24:mi:ss'),'{4}',to_date('{5}','yyyy-mm-dd hh24:mi:ss'),'{6}','{7}','{8}','{9}','{10}')", Guid.NewGuid().ToString(), record.HearUser, record.HearUserId, record.Time, record.Remark, record.CreateDate, record.CreateUser, record.CreateUserId, record.TicketId, record.Status, record.IsCommit));
                res.ExecuteBySql(string.Format("update XSS_TWOTICKETS set status='{0}' where id='{1}'", record.Status, record.TicketId));
                res.Commit();
                count = 1;
            }
            catch (Exception ex)
            {
                res.Rollback();
                count = 0;
            }
            return(count);
        }
Beispiel #3
0
 /// <summary>
 /// 插入票据处理记录
 /// </summary>
 /// <param name="record">记录对象</param>
 /// <param name="user">当前用户</param>
 /// <returns></returns>
 public int InsertRecord(TwoTicketRecordEntity record)
 {
     return(service.InsertRecord(record));
 }