protected void Page_Load(object sender, EventArgs e) { if (!User.Identity.IsAuthenticated) //if not logged in { Response.Redirect("/"); } //data loaded successfully try { dsEquipment = new EquipmentDataSet(); equipmentTableAdapter daEquipment = new equipmentTableAdapter(); daEquipment.Fill(dsEquipment.equipment); rows = (Session["criteria"] != null) ? dsEquipment.equipment.Select(Session["criteria"].ToString()) //has criteria : dsEquipment.equipment.Select(); //select all DisplayEquipment(); } catch { } }
static Purchase() { receiptTableAdapter daReceipt = new receiptTableAdapter(); daReceipt.Fill(dsReceipt.receipt); employeeTableAdapter daEmployee = new employeeTableAdapter(); daEmployee.Fill(dsReceipt.employee); productTableAdapter daProducts = new productTableAdapter(); productTable = daProducts.GetData(); order_lineTableAdapter daLine = new order_lineTableAdapter(); daLine.Fill(dsReceipt.order_line); service_orderTableAdapter daService = new service_orderTableAdapter(); daService.Fill(dsReceipt.service_order); equipmentTableAdapter daEqu = new equipmentTableAdapter(); daEqu.Fill(dsReceipt.equipment); }