예제 #1
0
        }   //machine Edit

        public string Edit(Model.OrderList orderList)
        {
            string sqlStr = "update OrderList set supID=@supID,empID=@empID,partsInfo=@partsInfo,date=@date,state=@state,total=@total where orderID=@orderID";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@orderID", orderList.OrderID),
                new SqlParameter("@supID", orderList.SupID),
                new SqlParameter("@empID", orderList.EmpID),
                new SqlParameter("@partsInfo", orderList.PartsInfo),
                new SqlParameter("@date", orderList.Date),
                new SqlParameter("@state", orderList.State),
                new SqlParameter("@total", orderList.Total)
            };
            if (userDao.Edit(sqlStr, paras))
            {
                return("Success");
            }
            else
            {
                return("Fail");
            }
        }   //orderList Edit
예제 #2
0
        }   //emoloyees Insert

        public string Insert(Model.OrderList orderList)
        {
            string sqlStr = "insert into OrderList(orderID,supID,empID,partsInfo,date,state,total) values(@orderID,@supID,@empID,@partsInfo,@date,@state,@total)";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@orderID", orderList.OrderID),
                new SqlParameter("@supID", orderList.SupID),
                new SqlParameter("@empID", orderList.EmpID),
                new SqlParameter("@partsInfo", orderList.PartsInfo),
                new SqlParameter("@date", orderList.Date),
                new SqlParameter("@state", orderList.State),
                new SqlParameter("@total", orderList.Total)
            };
            if (userDao.Insert(sqlStr, paras))
            {
                return("Success");
            }
            else
            {
                return("Fail");
            }
        }   //orderList Insert