/// <summary> /// 生成竞标信息 /// </summary> /// <param name="bidInfoModel">竞标信息</param> /// <returns>结果:0 失败 1 成功 -1 已存在</returns> public int InserBidInfo(BidInfoModel bidInfoModel) { int isExistInt = bidDal.IsBidInfoExist(bidInfoModel.MsgID, bidInfoModel.BidUID); if (isExistInt>0) { return -1; } return bidDal.InserBidInfo(bidInfoModel); }
public ContentResult AddBidInfo(string msgID) { string uID = "aa897dd5-f352-4395-8fd5-250cba00598d"; int tmpInt = 0; #region - check paras - if (!int.TryParse(msgID,out tmpInt)) { return Content("参数错误!"); } #endregion #region - excute - BidInfoModel bidInfoModel = new BidInfoModel(); bidInfoModel.BidUID = uID; bidInfoModel.MsgID = int.Parse(msgID); int resultInt = bidInfoBll.InserBidInfo(bidInfoModel); #endregion return Content(resultInt.ToString()); }