Пример #1
0
 public void ChangeTableType(DataRowView rowView,int type)
 {
     systemDataSetTableAdapters.tablesTableAdapter tables = new systemDataSetTableAdapters.tablesTableAdapter();
     DataRow row = rowView.Row;
     row["type_id"] = type;
     tables.Update(row);
 }
Пример #2
0
        public void TurnTable(DataRowView firstTable, DataRowView secTable)
        {
            systemDataSetTableAdapters.tablesTableAdapter tables = new systemDataSetTableAdapters.tablesTableAdapter();
            firstTable["type_id"] = 1;
            secTable["type_id"] = 2;
            tables.Update(firstTable.Row);
            tables.Update(secTable.Row);

            systemDataSetTableAdapters.ordersTableAdapter orders = new systemDataSetTableAdapters.ordersTableAdapter();
            int FirTable_id = (int)firstTable["id"];
            int SecTable_id = (int)secTable["id"];
            systemDataSet.ordersDataTable ordersDt =  orders.GetDataByTable(FirTable_id);
            DataRow OrderRow = ordersDt.Select().First();
            OrderRow["table_id"] = SecTable_id;
            orders.Update(OrderRow);
        }
Пример #3
0
 public void UpdateRow(DataRow row)
 {
     systemDataSetTableAdapters.tablesTableAdapter tableAp = new systemDataSetTableAdapters.tablesTableAdapter();
     tableAp.Update(row);
 }
Пример #4
0
 /// <summary>
 /// 查询所有桌台表信息
 /// </summary>
 /// <returns></returns>
 public DataTable SelectAll()
 {
     systemDataSetTableAdapters.tablesTableAdapter tables = new systemDataSetTableAdapters.tablesTableAdapter();
     DataTable dt = tables.GetData();
     return dt;
 }
Пример #5
0
 public DataTable GetFreeTable()
 {
     systemDataSetTableAdapters.tablesTableAdapter tables = new systemDataSetTableAdapters.tablesTableAdapter();
     DataTable dt = tables.GetDataByFree();
     return dt;
 }
Пример #6
0
 public void AddTable(DataTable dt)
 {
     systemDataSetTableAdapters.tablesTableAdapter tableAp = new systemDataSetTableAdapters.tablesTableAdapter();
     tableAp.Update((systemDataSet.tablesDataTable)dt);
 }