public int Create(Person person) { int Id = (int)SqlMap.Insert("InsertPerson", person); SqlMap.CommitTransaction(); return(Id); }
public void Insert(T entity) { using (DbConnection conn = _DataBase.CreateConnection()) { conn.ConnectionString = _strConn; SqlMap <T> .Insert(entity, conn, _DataBase); } }
/// <summary> /// 不明账款缴存 /// </summary> /// <param name="jdInfo"></param> /// <returns></returns> public bool AddUnKownJG_Deposit(UnknowBill jdInfo) { try { SqlMap.Insert("AddUnKownJG_Deposit", jdInfo); return(true); } catch (Exception ex) { throw ex; } }
/// <summary> /// 插入报文信息 /// </summary> /// <param name="mi"></param> /// <returns></returns> public static bool AddJG_MessageInfo(JG_MessageInfo mi) { try { SqlMap.Insert("AddJG_MessageInfo", mi); return(true); } catch (Exception e) { //return false; throw e; } }
/// <summary> /// 新增Payment /// </summary> /// <param name="p"></param> /// <returns></returns> public static bool insertPaymentInfo(JG_PaymentInfo p) { try { SqlMap.Insert("insertPaymentInfo", p); return(true); } catch (Exception e) { //return false; throw e; } }
public static bool AddMenuItem(MenuItem mi, out string e) { bool result = true; try { SqlMap.Insert("InsertMenuItem", mi); e = null; } catch (Exception ex) { result = false; e = ex.Message; } return(result); }
public void Insert(ICollection <T> entities) { using (DbConnection conn = _DataBase.CreateConnection()) { conn.ConnectionString = _strConn; // conn.Open(); if (conn.GetType() == typeof(SqlConnection)) { SqlMap <T> .SqlBulkInsert(entities, (SqlConnection)conn); } else { SqlMap <T> .Insert(entities, conn, _DataBase); } } }
/// <summary> /// 2013-07-26 /// 添加班级信息 /// </summary> /// <param name="calssses">班级实体</param> public void AddClaases(Calsses calssses) { SqlMap.Insert("InsertClasses", calssses); }
public static bool ProtocolSave(JG_SpvProtocol jG_SpvProtocol) { SqlMap.Insert("InsertSpvProtocol", jG_SpvProtocol); return(true); }