Esempio n. 1
0
 /// <summary>
 /// 是否存在该合同号
 /// </summary>
 /// <param name="model">合同号段model</param>
 /// <returns></returns>
 public bool ExistsNum(Model.ConStructure.MContractNum model)
 {
     if (model != null && !string.IsNullOrEmpty(model.CompanyId) && !string.IsNullOrEmpty(model.ContractCode))
     {
         return(dal.ExistsNum(model));
     }
     return(false);
 }
Esempio n. 2
0
        /// <summary>
        /// 是否存在该合同号
        /// </summary>
        /// <param name="model">合同号model:CompanyId,ContractNum</param>
        /// <returns></returns>
        public bool ExistsNum(Model.ConStructure.MContractNum model)
        {
            string    StrSql = " SELECT Count(1) FROM tbl_ContractNum WHERE CompanyId=@CompanyId and ContractCode=@ContractCode AND IsDelete='0' ";
            DbCommand dc     = this._db.GetSqlStringCommand(StrSql);

            this._db.AddInParameter(dc, "CompanyId", DbType.AnsiStringFixedLength, model.CompanyId);
            this._db.AddInParameter(dc, "ContractCode", DbType.String, model.ContractCode);
            return(EyouSoft.Toolkit.DAL.DbHelper.Exists(dc, _db));
        }