Ejemplo n.º 1
0
        /// <summary>
        /// 查询功能
        /// </summary>
        /// <returns></returns>
        public DataSet GetAllBook(Model.CustomServices b)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(@"select * from CustomServices a
   inner join Users b on a.CSDueID =b.UserID 
 
  inner join ServiceType c  on a.STID=c.STID
  
  inner join Customers d on a.CusID=d.CusID  INNER JOIN Users b on a.CSCreateID = b.UserID  where 1>0");
            if (!string.IsNullOrEmpty(b.CusName))
            {
                strSql.AppendFormat(" and d.CusName like '%{0}%'", b.CusName);
            }

            if (b.STID > 0)
            {
                strSql.Append(" and a.STID = '" + b.STID + "'");
            }
            if (b.ChanDueMan > 0)
            {
                strSql.Append(" and d.CSCreateID = '" + b.CSCreateID + "'");
            }

            return(DBUtility.DbHelperSQL.Query(strSql.ToString()));
        }
Ejemplo n.º 2
0
        public int UPdateStateFoure(Model.CustomServices book)
        {
            BLL.CustomServices b = new BLL.CustomServices();
            bool c = b.
                     UpdateFoure(book);

            if (c)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 3
0
        public int AddResult(Model.CustomServices book)
        {
            book.CSDealDate = DateTime.Now;
            BLL.CustomServices b = new BLL.CustomServices();
            bool c = b.
                     UpdateTwo(book);

            if (c)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 4
0
 public int AddOneBook(Model.CustomServices book)
 {
     BLL.CustomServices b = new BLL.CustomServices();
     return(b.Add(book));
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 查询功能
        /// </summary>
        /// <returns></returns>
        public List <Model.CustomServices> GetAllBook(Model.CustomServices b)
        {
            DataSet ds = dal.GetAllBook(b);

            return(DataTableToList(ds.Tables[0]));
        }