/// <summary> ///不存在则添加否则更新 /// </summary> /// <param name="RoomActiveJoin"></param> /// <returns></returns> public bool InsertUpdate(M_RoomActiveJoin model) { if (model.ID > 0) { GetUpdate(model); } else { GetInsert(model); } return(true); }
/// <summary> ///更新记录 /// </summary> /// <param name="RoomActiveJoin"></param> /// <returns></returns> public bool GetUpdate(M_RoomActiveJoin model) { return(Sql.UpdateByIDs(TbName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model))); }
/// <summary> ///添加记录 /// </summary> /// <param name="RoomActiveJoin"></param> /// <returns></returns> public bool GetInsert(M_RoomActiveJoin model) { return(Sql.insertID(TbName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model)) > 0); }
/// <summary> /// 根据ID更新 /// </summary> public bool UpdateByID(M_RoomActiveJoin model) { return(DBCenter.UpdateByID(model, model.ID)); }
/// <summary> ///添加记录 /// </summary> /// <param name="RoomActiveJoin"></param> /// <returns></returns> public bool GetInsert(M_RoomActiveJoin model) { return(DBCenter.Insert(model) > 0); }
public int insert(M_RoomActiveJoin model) { return(DBCenter.Insert(model)); }