index.aspx, index.aspx.vbDashboard (Label): Page title.CntEvm (Label): Displays count of EVM units.EVM (Label): "EVM" label.CntBB (Label): Displays count of Ballot Boxes.BallotBox (Label): "Ballot Box" label.CntVvpat (Label): Displays count of VVPAT units.VVPAT (Label): "VVPAT" label.CntStnry (Label): Displays count of Stationery Items.StationaryItems (Label): "Stationery Items" label.CntForms (Label): Displays total count of Forms.Forms (Label): "Forms" label.lblEvmUnits, lblEvmUnitsdesc (Labels): Title and description for EVM Units.lblControlUnits, lblCu (Labels): Title and count for Control Units, with image.lblBallotUnits, lblBU (Labels): Title and count for Ballot Units, with image.lblVVPatUnits, lblVvpat (Labels): Title and count for VVPAT Units, with image.lblBallotBoxes, lblBB (Labels): Title and count for Ballot Boxes, with image and description.lblStationeryItems, lblStnry, lblStationeryItemsDesc (Labels): Title, count, description, and list of stationery items (e.g., "Stationery Articles", "Envelopes", "Sign Boards", etc.).lblFormsPRI, lblFormPRI (Labels): Title, count, and description for Forms PRI.lblFormsUlb1, lblFormULB (Labels): Title, count, and description for Forms Municipalities.lblFormsUlb2, lblFormMC (Labels): Title, count, and description for Forms MC.div elements for layout (col-md-6, col-lg-2, col-xlg-3, card, box, etc.) and styling (e.g., bg-cyan, bg-success).<img>) for visual representation of EVM components and Ballot Box.aModal) and a corresponding modal structure (Modal1) (appears to be a generic modal not specifically tied to the dashboard content, perhaps for future use or inherited from a master page).Content3 is empty.index.aspx.vb):
SetCulture.commonFunctions object: For database interaction.Page_Load event:
myLang, userName, userLevel, dis_code, block_code from Session.getInventoryCounts() on initial page load.getInventoryCounts() (Private Sub):
ErmsInterface.hbInterface and ErmsBLL for data access.SqlCommand (@disBlkPanch) based on userLevel (e.g., "000" for "13", "001"/"006"/"012"/"013" for dis_code, others for block_code).MyInterface1.SELECTData(mycommand1, "getInventoryCounts") to retrieve inventory counts.Text property of various Label controls (lblCu, lblBU, lblBB, lblVvpat, lblStnry, lblFormPRI, lblFormULB, lblFormMC, CntEvm, CntBB, CntStnry, CntForms, CntVvpat) with the fetched data.MyGrid_RowDataBound (Commented Sub): This commented-out event handler indicates that a GridView named MyGrid was perhaps used previously on this dashboard for displaying election-related data, but it's now removed or replaced.viewEVM.aspx, viewEVM.aspx.vbgoogle.charts -- getChartData functionGridView with existing_grid id
GetEVMSummaryDataTable binds data from db to grid
lblTitle (Label): Page title ("EVM Unit Wise Summary").hdnLangCode (HiddenField): Stores the current language code for JavaScript use.dvList (Div): Container for the chart and grid.lineChart (Div): HTML container for the Google Column Chart.existing_grid (GridView):
ShowFooter="true" is set, indicating a potential total row (though not explicitly shown in data binding logic).OnRowDataBound colors rows based on District_Code ("9998" for LightPink, "9999" for LightGray and bold), likely for special/summary rows.lbl_error, lblStatus (Labels): For displaying messages.uprog1 (UpdateProgress): Preloader.btnExport (Button): "Export to Excel" button.cancel_button (Button): Resets the page.panel1 (UpdatePanel): Encloses content for AJAX.loaderGoogle.js).$(".preloader").fadeOut();: Hides preloader on page load.google.charts.load, google.charts.setOnLoadCallback(drawVisualizationNew): Loads Google Charts and calls drawVisualizationNew.drawVisualizationNew():
hdnLangCode.$.ajax) to the viewEVM.aspx/getChartData WebMethod to fetch chart data.google.visualization.DataTable.hi-IN or English).jsonData to add rows to the DataTable (place, CuVal, BuVal, Vvpat).google.visualization.BarChart (or ComboChart in commented code) in the lineChart div.viewEVM.aspx.vb):
SetCulture.commonFunctions object: For database access.ErmsInterface.hbInterface, ErmsBLL: For data access (SELECTData).Page_Load event:
userName, dis_code, userLevel from Session.hdnLangCode.Value.lblTitle text.objCommonFunctions.GetEVMSummaryDataTable() to fetch the summary data.DataTable to existing_grid.existing_grid, lbl_error, and btnExport based on data availability.cancel_button_Click event: Redirects to viewEVM.aspx.existing_grid_RowDataBound event:
BackColor and Font.Bold for specific rows in the grid based on District_Code ("9998" and "9999"). This is likely used to highlight summary or special rows.getChartData() (WebMethod - Public Shared Function):
lang and dis from HttpContext.Current.Session.SqlClient.SqlCommand and sets parameters (@lang, @dis, @chartFor="BB" - Note: @chartFor="BB" seems incorrect for EVM data, it should likely be "EVM" or similar. This could be a bug or a shared stored procedure.).MyInterface.SELECTData(MyCommand, "GetChartData") to retrieve chart data from the database.DataTable to a JSON string using obj.getJsonStringofTable(mytable) for client-side consumption.ExportExcel (Protected Sub):
DataTable named "EVM_Summary".existing_grid headers.existing_grid rows to extract data from labels (lblDisName, lblCU, lblBU, lblTotalUnits) and populates the DataTable.ClosedXML.Excel to generate and download an Excel report named "EvmReport.xlsx".viewLocation.aspx, viewLocation.aspx.vbrbUnitType (RadioButtonList): Allows selection of unit types, auto-posts back on selection change.existing_grid (GridView): Displays unit data, including "Item SrNo", "Current Location", and "View On Map".lbl_error, lblStatus, lblTitle, lblNoRow (Labels): For displaying messages and titles.btnShow (Button): "View All" button to trigger map data display.btnCancel (Button): "Cancel" button to navigate back.panel1 (UpdatePanel): Encloses the form and grid, enabling partial page updates.rptMarkers (Repeater): Used to generate JavaScript array of markers for Google Maps.dvList (Div): Container for the existing_grid.dvMap, dvMapModal (Divs): Containers for Google Maps.myMapModal (Modal): Bootstrap modal to display a larger map view.https://maps.googleapis.com/maps/api/js).markers JavaScript array populated by rptMarkers (Latitude, Longitude, SrNo).window.onload function: Initializes the main map (dvMap) with markers from markers array.showMapModal(lat, lng) function: Initializes a new Google Map within the myMapModal at the specified latitude and longitude when a "View on Map" link in the grid is clicked.existing_grid.viewLocation.aspx.vb):
SetCulture.commonFunctions object: Used for database interactions.Page_Load event:
UserID, gblDistrictCode, etc.).dis_code and wh_code based on userLevel.objCommonFunctions.PopulateUnitTypes(rbUnitType) on initial load.rbUnitType_SelectedIndexChanged on initial load.rbUnitType_SelectedIndexChanged event:
dis_code and wh_code based on userLevel (duplicate logic, could be refactored).objCommonFunctions.getEVMLocationList(rbUnitType.SelectedValue, dis_code, wh_code) to fetch data.DataTable to existing_grid.DataTable in Session("mapData").lbl_error.btnShow_Click event:
Session("mapData").DataTable to include only rows with valid Latitude values.rptMarkers to update the map markers.StationeryStockConsume.aspx, StationeryStockConsume.aspx.vblblTitle (Label): Page title.dvPri (Div), lblElectionFor (Label), rbPriPost (RadioButtonList): For selecting Election Type.rbUnitType (DropDownList): For selecting Stationery Unit Type (e.g., EVM, Ballot).DV (Div), rbBallotBoxStationery (RadioButtonList): Visible only when rbUnitType is "BALLOT", for selecting specific Ballot Box stationery.lblDis, ddlDis (Label, DropDownList): District information (conditionally visible/enabled based on user level).dvList (Div): Container for the existing_grid.existing_grid (GridView):
TextBox columns for "New Received Stock", "From Sr. No.", and "To Sr. No.".OnRowCommand and OnRowDeleting events defined (though OnRowCommand is empty in provided code, and OnRowDeleting is not implemented).OnRowDataBound handles visibility of Sr. No. columns and adds AsyncPostBackTrigger for textboxes.lbl_error, lblStatus (Labels): For displaying error and success messages.uprog1 (UpdateProgress): Shows preloader during async postbacks.save_button, cancel_button (Buttons): For saving data and canceling.panel1 (UpdatePanel): Encloses most of the content, with triggers for radio buttons and buttons.datatables.min.js).pageLoad() and initializeDataTable() functions: Re-initializes DataTables after partial postbacks to ensure proper functionality.StationeryStockConsume.aspx.vb):
SetCulture.commonFunctions object: For data access and common operations.LoginUser (UserData object): Stores session user information.Page_Load event:
LoginUser data and myLang.lblTitle text.rbPriPost (Election Type) and rbUnitType (Stationery Type).rbPriPost and rbUnitType.ddlDis based on LoginUser.UserLevel.objCommonFunctions.PopulateStationeryAvailableDataTable to fetch initial data for the grid.existing_grid and handles empty data.save_button_Click event:
DataTable (tbl_StationeryMapping) to hold consumed stationery details.existing_grid rows to collect UnitID, AllotedQuantity, FromSrNo, ToSrNo from user input.dbconnect.UpdateStationeryStock to save the data to the database.From Sr.No., To Sr.No., and qty.Text validation suggests an intended validation logic that is currently disabled.cancel_button_Click event: Redirects to the same page, effectively resetting the form.rbPriPost_SelectedIndexChanged event:
rbUnitType based on the selected Election Type.existing_grid with updated data based on the new selections.DV (BallotBoxStationery section).rbUnitType_SelectedIndexChanged event:
existing_grid.rbUnitType.SelectedValue is "BALLOT":
MyTable to group by ItemName and ItemSpecification.rbBallotBoxStationery with these filtered values.fillgrid_ballot() to display specific ballot stationery.DV.Visible = True.DV.Visible = False.MessageBox (Private Sub): A helper function to display client-side JavaScript alerts.existing_grid_RowCommand (Empty Sub): A placeholder for potential future command handling.rbBallotBoxStationery_SelectedIndexChanged event: Calls fillgrid_ballot().fillgrid_ballot() (Protected Sub): Filters MyTable based on rbBallotBoxStationery.SelectedValue and binds the result to existing_grid.existing_grid_RowDeleting (Empty Sub): A placeholder for potential future row deletion handling.existing_grid_RowDataBound event:
rbUnitType.SelectedValue.AsyncPostBackTrigger for lblFromSrNo and lblItemCounts textboxes within the grid to enable partial updates on text changes.unitCounts (appears to be a running total, though lblCnt is always empty).lblFromSrNo_TextChanged, lblItemCounts_TextChanged events:
UpdateToSrNo to automatically calculate To Sr. No. based on From Sr. No. and New Received Stock.UpdateToSrNo (Private Sub):
To Sr. No. based on From Sr. No. and New Received Stock.StationeryStockDispose.aspx, StationeryStockDispose.aspx.vblblTitle (Label): Page title.dvPri (Div), lblElectionFor (Label), rbPriPost (RadioButtonList): For selecting Election Type.rbUnitType (DropDownList): For selecting Stationery Unit Type (e.g., EVM, Ballot).DV (Div), rbBallotBoxStationery (RadioButtonList): Visible only when rbUnitType is "BALLOT", for selecting specific Ballot Box stationery.lblDis, ddlDis (Label, DropDownList): District information (conditionally visible/enabled based on user level).dvList (Div): Container for the existing_grid.existing_grid (GridView):
TextBox columns for "New Received Stock", "From Sr. No.", "To Sr. No.", and "Remarks".OnRowCommand and OnRowDeleting events defined (empty implementations in provided code).OnRowDataBound handles visibility of Sr. No. columns and adds AsyncPostBackTrigger for textboxes.lbl_error, lblStatus (Labels): For displaying error and success messages.uprog1 (UpdateProgress): Shows preloader during async postbacks.save_button, cancel_button (Buttons): For saving data and canceling.panel1 (UpdatePanel): Encloses most of the content, with triggers for radio buttons and buttons.datatables.min.js).pageLoad() and initializeDataTable() functions: Re-initializes DataTables after partial postbacks.StationeryStockDispose.aspx.vb):
SetCulture.commonFunctions object: For data access and common operations.LoginUser (UserData object): Stores session user information.Page_Load event:
LoginUser data and myLang.lblTitle text.rbPriPost, rbUnitType, ddlDis) and existing_grid with available stationery data.save_button_Click event:
DataTable (tbl_StationeryMapping) to collect disposal details.existing_grid rows to get UnitID, AllotedQuantity (disposed quantity), FromSrNo, ToSrNo, and remarks.remarks is empty when AllotedQuantity is greater than 0, displaying an alert if so.dbconnect.UpdateStationeryStock (with True for IsConsume and False for IsReceive, implying disposal logic) to update the database.cancel_button_Click event: Redirects to the same page.rbPriPost_SelectedIndexChanged event: Updates rbUnitType and existing_grid based on the selected election type.rbUnitType_SelectedIndexChanged event:
existing_grid with data for the selected stationery type.rbBallotBoxStationery and calls fillgrid_ballot().MessageBox (Private Sub): Client-side alert helper.existing_grid_RowCommand (Empty Sub): Placeholder.rbBallotBoxStationery_SelectedIndexChanged event: Calls fillgrid_ballot().fillgrid_ballot() (Protected Sub): Filters and binds grid data for ballot box stationery.existing_grid_RowDeleting (Empty Sub): Placeholder.existing_grid_RowDataBound event:
AsyncPostBackTrigger for lblFromSrNo and lblItemCounts textboxes.lblFromSrNo_TextChanged, lblItemCounts_TextChanged events: Call UpdateToSrNo.CustomValidator1_ServerValidate (Protected Sub): Performs server-side validation to ensure remarks are provided if a quantity is entered.UpdateToSrNo (Private Sub): Calculates To Sr. No. based on From Sr. No. and New Received Stock.StationeryStockSummary.aspx, StationeryStockSummary.aspx.vblblTitle (Label): Page title.dvPri, lblElectionFor, rbPriPost (Div, Label, RadioButtonList): For selecting Election Type.rbUnitType (DropDownList): For selecting Stationery Unit Type.DV, rbBallotBoxStationery (Div, RadioButtonList): For specific Ballot Box stationery (conditionally visible).lblDis, ddlDis (Label, DropDownList): For selecting District. AutoPostBack enabled.dvBlock, lblBlk, ddlBlk (Div, Label, DropDownList): For selecting Block (conditionally visible based on user level and election type). AutoPostBack enabled.dvList (Div): Container for existing_grid.existing_grid (GridView):
OnRowCommand and OnRowDeleting events defined (empty implementations in provided code).lbl_error, lblStatus (Labels): For messages.uprog1 (UpdateProgress): Shows preloader.btnExport (Button): "Export to Excel" button.cancel_button (Button): "Cancel" button.panel1 (UpdatePanel): Encloses controls for partial postbacks.datatables.min.js).pageLoad() and initializeDataTable() functions: Ensures DataTables re-initialization after AJAX updates.StationeryStockSummary.aspx.vb):
SetCulture.commonFunctions and ClosedXML.Excel for Excel export.LoginUser (UserData object): Stores session user information.Page_Load event:
LoginUser data.lblTitle text.rbPriPost (Election Type) and calls rbPriPost_SelectedIndexChanged to cascade loading.fill_grid() (Private Sub):
user (stock owner code) and is_self flag based on ddlDis and ddlBlk selections and LoginUser.UserLevel.objCommonFunctions.GetStationeryStockSummary to fetch the summary data.List(Of StockItem.StockSummary) to existing_grid.cancel_button_Click event: Redirects to the same page.rbPriPost_SelectedIndexChanged event:
rbUnitType based on the selected Election Type.rbUnitType_SelectedIndexChanged to cascade loading.rbUnitType_SelectedIndexChanged event:
ddlDis (District) based on user level, setting the default to the user's district if applicable.ddlDis_SelectedIndexChanged to cascade loading.ddlDis_SelectedIndexChanged event:
lblBlk.Text (Block/ULB/MC) based on rbPriPost.SelectedValue.ddlBlk (Block) based on the selected District and Election Type.ddlDis and ddlBlk based on LoginUser.UserLevel.ddlBlk_SelectedIndexChanged to cascade loading.fill_grid().ddlBlk_SelectedIndexChanged event: Calls fill_grid().MessageBox (Private Sub): Client-side alert helper.existing_grid_RowCommand (Empty Sub): Placeholder.rbBallotBoxStationery_SelectedIndexChanged event: Calls fillgrid_ballot().fillgrid_ballot() (Protected Sub): Filters grid data for ballot box stationery when rbUnitType is "BALLOT".existing_grid_RowDeleting (Empty Sub): Placeholder.existing_grid_RowDataBound event: (Commented out in provided code, suggesting it's not actively used or was for previous versions of the grid. It previously tried to add async triggers and calculate unitCounts.)lblFromSrNo_TextChanged, UpdateToSrNo (Private Subs): These functions are present but seem to be remnants from a page with editable Sr. No. fields (like StationeryStockConsume or StationeryStockDispose). In a summary page, these would typically not be relevant as data is displayed, not edited. lblItemCounts_TextChanged is commented out.ExportExcel (Protected Sub):
DataTable from the existing_grid data.ClosedXML.Excel to create an Excel workbook from the DataTable.updateStationeryMasters.aspx, updateStationeryMasters.aspx.vblblTitle (Label): Page title ("Update Stock").dvPri, lblElectionFor, rbPriPost (Div, Label, RadioButtonList): For selecting Election Type.rbUnitType (DropDownList): For selecting Stationery Unit Type.DV, rbBallotBoxStationery (Div, RadioButtonList): For specific Ballot Box stationery (conditionally visible).lblDis, ddlDis (Label, DropDownList): District dropdown (visible=false, enabled=false in ASPX, but code implies it's for filtering if active).btn_add_new (Button): Redirects to AddNewMaster.aspx to add a new item.dvList (Div): Container for existing_grid.existing_grid (GridView):
LinkButton for "Edit", "DeActivate", and "ReActivate". The text of the activate/deactivate button changes based on the is_active field.OnRowCommand handles clicks on "Edit", "DeActivate", "ReActivate" and redirects to respective pages with id as a query parameter.OnRowDeleting event defined (empty implementation).panel1 (UpdatePanel): Encloses most of the content.datatables.min.js).pageLoad() and initializeDataTable() functions: Ensures DataTables re-initialization.updateStationeryMasters.aspx.vb):
SetCulture.commonFunctions object: For data access.LoginData (UserData object): Stores session user information.Page_Load event:
LoginData and myLang.lblTitle text.rbPriPost (Election Type) and calls rbPriPost_SelectedIndexChanged.fillgrid() (Private Sub):
LoginData.UserLevel. If "000" (likely admin), it populates existing_grid with all available stationery master data.rbUnitType.SelectedValue is "BALLOT", it groups the data to populate rbBallotBoxStationery and then calls fillgrid_ballot().rbPriPost_SelectedIndexChanged event:
rbUnitType based on selected election type.rbUnitType_SelectedIndexChanged to trigger grid fill.rbUnitType_SelectedIndexChanged event: Calls fillgrid().MessageBox (Private Sub): Client-side alert helper.rbBallotBoxStationery_SelectedIndexChanged event: Calls fillgrid_ballot().fillgrid_ballot() (Protected Sub): Filters MyTable by ItemSpecification from rbBallotBoxStationery.SelectedValue and binds to existing_grid. Sets DV.Visible = True.existing_grid_RowDeleting (Empty Sub): Placeholder.existing_grid_RowDataBound (Empty Sub): Placeholder.btn_add_new_Click event: Redirects to AddNewMaster.aspx with query parameters from current selections.existing_grid_RowCommand event:
EditMaster.aspx with id and rbBallotBoxStationery as query parameters.DeactivateMaster.aspx with id.ReactivateMaster.aspx with id.addBallotBox.aspx, addBallotBox.aspx.vbsave_button_Click logic).formNom):
lblTitle (Label): Page title ("Add Ballot").ddlSeries (DropDownList): For selecting Ballot Box Series. AutoPostBack enabled.ddlModel (DropDownList): For selecting Ballot Box Model/Size.ddlMon, ddlYr (DropDownLists): For selecting Month and Year of Purchase.txtUnitCounts (TextBox): For entering the number of units. Includes RegularExpressionValidator for numbers.txtFromSrNo (TextBox): For entering the starting serial number. AutoPostBack enabled. Includes RegularExpressionValidator.txtToSrNo (TextBox): Displays the calculated ending serial number (read-only).txtUnitID (Label - hidden): Likely used to store an ID for updates (though the current flow is for adding).lbl_error, lblStatus (Labels): For displaying messages.uprog1 (UpdateProgress): Shows preloader.save_button (Button): Saves the new Ballot Box entries.cancel_button (Button - partially commented out in ASPX): Likely intended for resetting the form or navigating back.dvList):
existing_grid (GridView):
DataKeyNames set to from_sr_no, to_sr_no, series, box_size for row command arguments.LinkButton (hidden header, visible item template) with OnClientClick for confirmation.Button that triggers a ShowQR command.cancel_button (Button - present in dvList): Allows navigating back.calculateToSrNo(): JavaScript function that calculates txtToSrNo based on txtFromSrNo and txtUnitCounts on input change.confirmDelete(): JavaScript function for delete confirmation.pageLoad() and initializeDataTable(): Ensures DataTables re-initialization after AJAX updates.addBallotBox.aspx.vb):
System.Web.UI.Page.commonFunctions object: For database interactions.user (UserData object): Stores session user information.list_ (List(Of Ballot.Ballot_Series)): Stores Ballot Series master data, persisted in ViewState.Page_Load event:
lblTitle text.objCommonFunctions.Ballot_Series_Master_Get() to get series data.ddlSeries and stores the data in ViewState("BallotSeriesList").ddlSeries_SelectedIndexChanged to populate related dropdowns.fill_grid() to display existing Ballot Boxes.list_ from ViewState.ddlSeries_SelectedIndexChanged event:
list_ (from ViewState).ddlModel, ddlMon, ddlYr with corresponding values from the selected series.existing_grid_RowDeleting (Empty Sub): Placeholder.save_button_Click event:
ddlModel, txtUnitCounts, ddlSeries, ddlMon, ddlYr).DBAccess.UpdateBallotBoxStock to save the new Ballot Box entry. (Note: The UpdateBallotBoxStock method is used for adding, indicated by the last parameter 1).txtFromSrNo on "Invalid Sr No" error.cancel_button_Click event: Redirects to addBallotBox.aspx, effectively resetting the page.MessageBox (Private Sub): Client-side alert helper.existing_grid_RowDataBound (Commented out code): This section contains commented-out logic that would have manipulated cell visibility and text, and handled QR button visibility based on QR_Generated status. It seems this functionality might have been moved or refactored.existing_grid_RowCommand event:
DBAccess.deleteBallotMaster using DataKeys (from_sr_no, to_sr_no, series, box_size) and re-fills the grid.DBAccess.Show_Ballot_ByID to retrieve QR data.objCommonFunctions.getQRCODE) and constructs HTML for printing.Session("strText") and redirects to printForm.aspx to display/print QR codes.fill_grid() (Private Sub):
objCommonFunctions.Show_Ballot_Owner to get a list of Ballot_Stock_Owner objects.existing_grid to display current Ballot Boxes.BallotBoxAllocation.aspx, BallotBoxAllocation.aspx.vblblTitle (Label): Page title ("Ballot Box Allocation").div_state, lblState, ddlState (Div, Label, DropDownList): For selecting State. AutoPostBack.div_district, lblDis, ddlDis (Div, Label, DropDownList): For selecting District. Conditionally visible. AutoPostBack.div_block, lblBlk, ddlBlk (Div, Label, DropDownList): For selecting Block. Conditionally visible. AutoPostBack.div_Polparty, lblPolparty, ddlPolparty (Div, Label, DropDownList): For selecting Political Party. Conditionally visible. AutoPostBack.existing_grid (GridView - Left side): Displays "No Ballot Box For Allocation".
qr_text_description.Button with CommandName="AllocateQR".DataKeyNames set to qr_text_description, to_user_id, from_user_id, is_received.existing_grid1 (GridView - Right side): Displays "No Ballot Box Alloted".
qr_text_description.Button (visible if is_received is true) and a "De-Allocate" Button (visible if is_received is false).DataKeyNames are the same as existing_grid.lbl_error, lblStatus (Labels): For messages.uprog1 (UpdateProgress): Preloader.save_button (Button - hidden): Remains from other pages, not actively used in this allocation context.cancel_button (Button): Resets the page.panel1 (UpdatePanel): Encloses content for AJAX.pageLoad() and initializeDataTable(), initialize1DataTable(): Ensures DataTables re-initialization for both grids.BallotBoxAllocation.aspx.vb):
SetCulture.commonFunctions object: For database.user (UserData object): Current logged-in user.Page_Load event:
user and myLang.lblTitle text.ddlState and calls ddlState_SelectedIndexChanged.save_button_Click (Handles a hidden button, contains commented-out or old logic for generic stationery update, not specific to this page's QR allocation). This method's logic doesn't seem to be used for the allocate/de-allocate actions.cancel_button_Click event: Redirects to BallotBoxAllocation.aspx.ddlState_SelectedIndexChanged event:
ddlDis (District) based on the selected state.ddlState.Enabled based on user.UserLevel.ddlDis to the user's district if applicable.ddlDis_SelectedIndexChanged.ddlDis_SelectedIndexChanged event:
ddlBlk (Block).ddlBlk to the user's block if applicable.ddlBlk_SelectedIndexChanged.FillGrid(ddlDis) if no blocks found or if ddlDis is the primary filter.ddlBlk_SelectedIndexChanged event:
user.UserLevel:
FillGrid(ddlDis). Hides block.FillGrid(ddlBlk).ddlPolparty if the selected block is the user's block. Otherwise, hides political party dropdown.FillGrid(sender) (or specific dropdown) to update grids.ddlPolparty_SelectedIndexChanged event: Calls FillGrid(sender).existing_grid_RowCommand event (for existing_grid - left grid):
qrTextDescription and to_user_id from CommandArgument.UpdateData(qrTextDescription, qr_to_user, 3) (action 3 likely means allocate).existing_grid1_RowCommand event (for existing_grid1 - right grid):
qrTextDescription and to_user_id.UpdateData(qrTextDescription, qr_to_user, 4) (action 4 likely means de-allocate).existing_grid_RowDeleting (Empty Sub): Placeholder.existing_grid_RowDataBound (Empty Sub): Placeholder.FillGrid(_picker As DropDownList, Optional _value As String = "") (Public Sub):
Show_Ballot_User_Id with "from" type) and binds to existing_grid.Show_Ballot_User_Id with "to" type) and binds to existing_grid1.UpdateData(qrTextDescription As String, qr_to_user As String, action As Int16) (Private Sub):
DBAccess.UpdateBallotBoxStock to perform the actual allocation/de-allocation in the database.viewBallotBox.aspx, viewBallotBox.aspx.vbInvalid column name 'to_location_id'. (As noted previously, this suggests a database schema mismatch or a typo in the underlying stored procedure or data access for viewBallotBox that has not been directly addressed in the provided code snippets.)lblTitle (Label): Page title ("Ballot Box Summary").hdnLangCode (HiddenField): Stores the current language code for JavaScript use.dvList (Div): Container for the chart and grid.lineChart (Div): HTML container for the Google Column Chart.existing_grid (GridView):
ShowFooter="true" implies a total row, though the data binding might handle it implicitly.OnRowDataBound colors rows based on to_user_code ("9998" for LightPink, "9999" for LightGray and bold).lbl_error, lblStatus (Labels): For messages.uprog1 (UpdateProgress): Preloader.btnExport (Button): "Export to Excel" button.cancel_button (Button): Resets the page.panel1 (UpdatePanel): Encloses content for AJAX.loaderGoogle.js).$(".preloader").fadeOut();: Hides preloader on page load.google.charts.load, google.charts.setOnLoadCallback(drawVisualizationNew): Loads Google Charts and calls the drawVisualizationNew function.drawVisualizationNew():
hdnLangCode.google.visualization.DataTable.existing_grid tbody rows (skipping header and the very first data row - index === 1 means it skips the row that is typically a "Total" or special row, or simply starts from the second data row) to extract "Place" and "Ballot Box Count".google.visualization.ColumnChart in lineChart div using the extracted data.viewBallotBox.aspx.vb):
SetCulture.user (UserData object): Current logged-in user.commonFunctions object: For database access.ErmsInterface.hbInterface, ErmsBLL: For data access (SELECTData).Page_Load event:
user and session data (UserID, gblDistrictCode, UserLevel, MyLanguage).hdnLangCode.Value.lblTitle text.objCommonFunctions.getBallotBoxListSummary_Category_Wise(user.Code) to fetch summary data.List(Of Ballot.BallotSummary) to existing_grid.existing_grid, lbl_error, and btnExport based on data availability.cancel_button_Click event: Redirects to viewBallotBox.aspx.existing_grid_RowDataBound event:
BackColor and Font.Bold for specific rows in the grid based on to_user_code ("9998" and "9999"). This is likely used to highlight summary or special rows.getChartData() (WebMethod - Public Shared Function):
lang and dis from HttpContext.Current.Session.SqlClient.SqlCommand and sets parameters (@lang, @dis, @chartFor="BB").MyInterface.SELECTData(MyCommand, "GetChartData") to retrieve chart data from the database.DataTable to a JSON string using obj.getJsonStringofTable(mytable) for client-side consumption.drawVisualizationNew JavaScript in the ASPX doesn't call this WebMethod. It appears to render the chart directly from the existing_grid's already bound data. This getChartData WebMethod might be a remnant or intended for a different use case (e.g., initial chart load via AJAX without a full postback to bind the grid).ExportExcel (Protected Sub):
DataTable from the existing_grid's data.ClosedXML.Excel to generate an Excel file.viewBallotBoxList.aspx, viewBallotBoxList.aspx.vbInvalid column name 'to_location_id'. (This error is explicitly mentioned in the initial prompt and likely applies to the data retrieval for this page, specifically to the getBallotBoxListSummary_Unit_Wise method or its underlying query.)lblTitle (Label): Page title ("Ballot Box Unit List").lblDis, ddlDis (Label, DropDownList): For selecting District. AutoPostBack enabled.dvBlock, lblBlk, ddlBlk (Div, Label, DropDownList): For selecting Block. Conditionally visible. AutoPostBack enabled.lbl_error, lblStatus (Labels): For messages.uprog1 (UpdateProgress): Preloader.dvList (Div): Container for existing_grid.existing_grid (GridView):
HyperLink to viewBBonMap.aspx (for viewing on map), enabled only if latitude is valid.Button with CommandName="ShowQR".btnExport (Button): "Export to Excel" button.map_button (Button): "View All On Map" button, redirects to viewBBonMap.aspx with selected district/block.cancel_button (Button): Resets the page.panel1 (UpdatePanel): Encloses content for AJAX.pageLoad() and initializeDataTable(): Ensures DataTables re-initialization.viewBallotBoxList.aspx.vb):
SetCulture.commonFunctions object: For database access.LoginUser (UserData object): Current logged-in user.Page_Load event:
LoginUser data.lblTitle text.ddlDis (District) and sets default/selected based on LoginUser.DistrictCode and Session variables.ddlDis_SelectedIndexChanged to cascade loading.fill_grid().fill_grid() (Private Sub):
user (code for filtering) based on ddlBlk or ddlDis selection.objCommonFunctions.getBallotBoxListSummary_Unit_Wise(user, "") to retrieve unit-wise summary.List(Of BallotSummaryList) to existing_grid.dvList and lbl_error.cancel_button_Click event: Redirects to viewBallotBoxList.aspx.ddlDis_SelectedIndexChanged event:
lblBlk.Text.ddlBlk (Block) based on selected district and election type "001" (likely hardcoded for Panchayat Raj institutions).ddlDis and ddlBlk based on LoginUser.UserLevel and Session variables.ddlBlk_SelectedIndexChanged to cascade.ddlBlk_SelectedIndexChanged event: Calls fill_grid().MessageBox (Private Sub): Client-side alert helper.existing_grid_RowCommand event:
qr_text_description from CommandArgument.objCommonFunctions.getQRCODE).Session("strText") and Session("unitType").ScriptManager.RegisterStartupScript to open printForm.aspx in a new window.map_button_Click event:
ddlBlk.SelectedIndex and ddlDis.SelectedIndex in Session.viewBBonMap.aspx passing to_user_code from either ddlBlk or ddlDis.existing_grid_RowDeleting (Empty Sub): Placeholder.existing_grid_RowDataBound (Empty Sub): Placeholder.ExportExcel (Protected Sub):
DataTable with "Item Description" and "Item Location" columns.DataTable by iterating through existing_grid rows and extracting text from qr_text and Display_Name labels.ClosedXML.Excel to generate and download an Excel report.viewBallotBoxList.aspx page as UnitTest--viewBallotBoxList based on the file paths and content.)Invalid column name 'to_location_id'. (This likely applies here as well, as it's the same underlying page/data access.)Readme.md likely refers to a scenario in this page's QR viewing/printing logic where no QR data is found or a dropdown selection for QR is empty.