protected void showConsignorsPanel() { string errMsg = string.Empty; mySqlConnector mySqlConn = new mySqlConnector(); if (mySqlConn.isInitialized()) { BoundField eventTitle = new BoundField(); eventTitle.ReadOnly = true; eventTitle.HeaderText = "Event"; eventTitle.DataField = "eventtitle"; //eventTitle.SortExpression = "eventtitle"; gvExportList.Columns.Add(eventTitle); BoundField venue = new BoundField(); venue.ReadOnly = true; venue.HeaderText = "Venue"; venue.DataField = "venue"; //venue.SortExpression = "venue"; gvExportList.Columns.Add(venue); BoundField eventDate = new BoundField(); eventDate.ReadOnly = true; eventDate.HeaderText = "Date"; eventDate.DataField = "eventdate"; //eventDate.SortExpression = "eventdate"; gvExportList.Columns.Add(eventDate); BoundField eventTime = new BoundField(); eventTime.ReadOnly = true; eventTime.HeaderText = "Time"; eventTime.DataField = "eventtime"; // eventTime.SortExpression = "eventtime"; gvExportList.Columns.Add(eventTime); BoundField qty = new BoundField(); qty.ReadOnly = true; qty.HeaderText = "Qty"; qty.DataField = "quantity"; //qty.SortExpression = "quantity"; gvExportList.Columns.Add(qty); BoundField sec = new BoundField(); sec.ReadOnly = true; sec.HeaderText = "Section"; sec.DataField = "section"; //sec.SortExpression = "section"; gvExportList.Columns.Add(sec); BoundField seatRow = new BoundField(); seatRow.ReadOnly = true; seatRow.HeaderText = "Row"; seatRow.DataField = "seatrow"; //seatRow.SortExpression = "seatrow"; gvExportList.Columns.Add(seatRow); BoundField seatFrom = new BoundField(); seatFrom.ReadOnly = true; seatFrom.HeaderText = "From"; seatFrom.DataField = "seatfrom"; //seatFrom.SortExpression = "seatfrom"; gvExportList.Columns.Add(seatFrom); BoundField seatThru = new BoundField(); seatThru.ReadOnly = true; seatThru.HeaderText = "Thru"; seatThru.DataField = "seatthru"; //seatThru.SortExpression = "seatthru"; gvExportList.Columns.Add(seatThru); BoundField cost = new BoundField(); cost.ReadOnly = true; cost.HeaderText = "Price"; cost.DataField = "cost"; //cost.SortExpression = "cost"; gvExportList.Columns.Add(cost); BoundField cNotes = new BoundField(); cNotes.ReadOnly = true; cNotes.HeaderText = "Notes"; cNotes.DataField = "consignornotes"; //cNotes.SortExpression = "consignornotes"; gvExportList.Columns.Add(cNotes); //now make call to database for rows if (mySqlConn.getExportList(Convert.ToInt16(Session["userId"]), true)) { gvExportList.DataSource = null; gvExportList.Dispose(); gvExportList.DataSource = mySqlConn.ds; gvExportList.DataBind(); } else { noExports.Text = mySqlConn.connErrMsg; noExports.Visible = true; } } else { errMsg = "db connection error!"; displayMySqlConnErr(errMsg); } mySqlConn.deInitialize(); consignorsPanel.Visible = true; }
protected void showPendingInventoryExports() { string errMsg = string.Empty; mySqlConnector mySqlConn = new mySqlConnector(); if (mySqlConn.isInitialized()) { if (mySqlConn.getExportList()) { GVExportList_Clear(); if (gvExportList.Columns.Count < 1) { BoundField userId = new BoundField(); userId.ReadOnly = true; userId.HeaderText = "UserId"; userId.DataField = "emailaddress"; //userId.SortExpression = "emailaddress"; gvExportList.Columns.Add(userId); BoundField eventTitle = new BoundField(); eventTitle.ReadOnly = true; eventTitle.HeaderText = "Event"; eventTitle.DataField = "eventtitle"; //eventTitle.SortExpression = "eventtitle"; gvExportList.Columns.Add(eventTitle); BoundField venue = new BoundField(); venue.ReadOnly = true; venue.HeaderText = "Venue"; venue.DataField = "venue"; //venue.SortExpression = "venue"; gvExportList.Columns.Add(venue); BoundField eventDate = new BoundField(); eventDate.ReadOnly = true; eventDate.HeaderText = "Date"; eventDate.DataField = "eventdate"; //eventDate.SortExpression = "eventdate"; gvExportList.Columns.Add(eventDate); BoundField eventTime = new BoundField(); eventTime.ReadOnly = true; eventTime.HeaderText = "Time"; eventTime.DataField = "eventtime"; // eventTime.SortExpression = "eventtime"; gvExportList.Columns.Add(eventTime); BoundField qty = new BoundField(); qty.ReadOnly = true; qty.HeaderText = "Qty"; qty.DataField = "quantity"; //qty.SortExpression = "quantity"; gvExportList.Columns.Add(qty); BoundField sec = new BoundField(); sec.ReadOnly = true; sec.HeaderText = "Section"; sec.DataField = "section"; //sec.SortExpression = "section"; gvExportList.Columns.Add(sec); BoundField seatRow = new BoundField(); seatRow.ReadOnly = true; seatRow.HeaderText = "Row"; seatRow.DataField = "seatrow"; //seatRow.SortExpression = "seatrow"; gvExportList.Columns.Add(seatRow); BoundField seatFrom = new BoundField(); seatFrom.ReadOnly = true; seatFrom.HeaderText = "From"; seatFrom.DataField = "seatfrom"; //seatFrom.SortExpression = "seatfrom"; gvExportList.Columns.Add(seatFrom); BoundField seatThru = new BoundField(); seatThru.ReadOnly = true; seatThru.HeaderText = "Thru"; seatThru.DataField = "seatthru"; //seatThru.SortExpression = "seatthru"; gvExportList.Columns.Add(seatThru); BoundField cost = new BoundField(); cost.ReadOnly = true; cost.HeaderText = "Price"; cost.DataField = "cost"; //cost.SortExpression = "cost"; gvExportList.Columns.Add(cost); BoundField cNotes = new BoundField(); cNotes.ReadOnly = true; cNotes.HeaderText = "Notes"; cNotes.DataField = "consignornotes"; //cNotes.SortExpression = "consignornotes"; gvExportList.Columns.Add(cNotes); gvExportList.DataSource = mySqlConn.ds; gvExportList.DataBind(); } } else { GVExportList_Clear(); noExports.Text = mySqlConn.connErrMsg; noExports.Visible = true; } } else { errMsg = "db connection error!"; displayFormErrors(errMsg); } mySqlConn.deInitialize(); }