public bool AddStock(M_Stock model) { string sqlStrs = ""; if (model.stocktype == 0) { sqlStrs = "Update ZL_Commodities set Stock=Stock+" + model.Pronum + " where ID=" + model.proid; } else { sqlStrs = "Update ZL_Commodities set Stock=Stock-" + model.Pronum + " where ID=" + model.proid; } SqlHelper.ExecuteSql(sqlStrs); return(Sql.insertID(TbName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)) > 0); }
public int insert(M_Stock model) { return(Sql.insertID(TbName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool UpdateByID(M_Stock model) { return(Sql.UpdateByIDs(TbName, PK, model.id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters())); }