コード例 #1
0
        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);
        }
コード例 #2
0
 public int insert(M_Stock model)
 {
     return(Sql.insertID(TbName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
コード例 #3
0
 public bool UpdateByID(M_Stock model)
 {
     return(Sql.UpdateByIDs(TbName, PK, model.id.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }