Exemplo n.º 1
0
 /// <summary>
 ///不存在则添加否则更新
 /// </summary>
 /// <param name="Subscribe"></param>
 /// <returns></returns>
 public bool InsertUpdate(M_Subscribe model)
 {
     if (model.ID > 0)
     {
         return(UpdateByID(model));
     }
     else
     {
         return(insert(model) > 0);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///更新记录
 /// </summary>
 /// <param name="Subscribe"></param>
 /// <returns></returns>
 public bool GetUpdate(M_Subscribe model)
 {
     return(UpdateByID(model));
 }
Exemplo n.º 3
0
 /// <summary>
 ///添加记录
 /// </summary>
 /// <param name="Subscribe"></param>
 /// <returns></returns>
 public bool GetInsert(M_Subscribe model)
 {
     return(insert(model) > 0);
 }
Exemplo n.º 4
0
 public int insert(M_Subscribe model)
 {
     return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
Exemplo n.º 5
0
 public bool UpdateByID(M_Subscribe model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model)));
 }
Exemplo n.º 6
0
 public int insert(M_Subscribe model)
 {
     return(DBCenter.Insert(model));
 }
Exemplo n.º 7
0
 public bool UpdateByID(M_Subscribe model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }