Ejemplo n.º 1
0
        //查询物流号
        public information delt(string orderNum)
        {
            string sql = "select * from [information] where [ordID]='{0}'";

            DAO.information orders = db.Database.SqlQuery <DAO.information>(string.Format(sql, orderNum)).FirstOrDefault();
            return(orders);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 添加一条记录
        /// </summary>
        /// <param name="model">物流信息</param>
        /// <returns></returns>
        public DAO.information Add(DAO.information model)
        {
            DAO.information m = db.information.Add(model);
            int             i = db.SaveChanges();

            if (i > 0)
            {
                return(m);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加一条记录
        /// </summary>
        /// <param name="model">添加物流信息</param>
        /// <returns></returns>
        public DAO.information AddOrderNum(DAO.information model)
        {
            string sql  = "UPDATE [Order] SET [wuliuhao]='{0}' where [orderID]='{1}'";
            int    date = db.Database.ExecuteSqlCommand(string.Format(sql, model.wuliuhao, model.ordID));

            DAO.information m = db.information.Add(model);
            int             i = db.SaveChanges();

            if (i > 0 && date > 0)
            {
                return(m);
            }
            else
            {
                return(null);
            }
        }