Current Path : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/App_Code/BL/ |
Windows NT SG2NWVPWEB022 10.0 build 17763 (Windows Server 2016) i586 |
Current File : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/App_Code/BL/getdb.vb |
Imports Microsoft.VisualBasic Public Class getdb Public Shared Function stringsqlgrd() As String Dim allsql As String = "" allsql = "SELECT Login_ID AS LoginId, Company_Name, Division_Name, District_Name, City_ULB_Name AS City_Name, MunicipalArea AS Municipal_Area, Population, " & _ " IWaterS_2015 AS [Water_Supply 2015], IWaterS_2025 AS [Water_Supply 2025], IWaterS_2035 AS [Water_Supply 2035], " & _ " Total_IWaterS AS [Water_Supply Total], ISewerage_15 AS [Sewerage 2015], ISewerage_25 AS [Sewerage 2025], ISewerage_35 AS [Sewerage 2035], " & _ " Total_ISewerage AS [Sewerage Total], IStormWaterDrain_15 AS [Strom_Water_Drainage 2015], IStormWaterDrain_25 AS [Strom_Water_Drainage 2025]," & _ " IStormWaterDrain_35 AS [Strom_Water_Drainage 2035], Total_IStormWaterDrain AS [Strom_Water_Drainage Total], " & _ " ISolideWastMgt_15 AS [Solid_Waste_Mgt. 2015], ISolideWastMgt_25 AS [Solid_Waste_Mgt. 2025], ISolideWastMgt_35 AS [Solid_Waste_Mgt. 2035], " & _ " Total_ISolideWastMgt AS [Solid_Waste_Mgt. Total], ISanitation_15 AS [Sanitation 2015], ISanitation_25 AS [Sanitation 2025]," & _ " ISanitation_35 AS [Sanitation 2035], Total_ISanitation AS [Sanitation Total], ITrafic_Trans_15 AS [Trafffic_&_Transportation 2015]," & _ " ITrafic_Trans_25 AS [Trafffic_&_Transportation 2025], ITrafic_Trans_35 AS [Trafffic_&_Transportation 2035], " & _ " Total_ITrafic_Trans AS [Trafffic_&_Transportation Total], IElectriStrit_15 AS [Electricity_&_Street_Light 2015]," & _ " IElectriStrit_25 AS [Electricity_&_Street_Light 2025], IElectriStrit_35 AS [Electricity_&_Street_Light 2035]," & _ " Total_IElectriStrit AS [Electricity_&_Street_Light Total], IFire_Fit_15 AS [Fire_Fighting 2015], IFire_Fit_25 AS [Fire_Fighting 2025]," & _ " IFire_Fit_35 AS [Fire_Fighting 2035], Total_IFire_Fit AS [Fire_Fighting Total], IBasicSerUP_15 AS [Basic_Services_for_Urban_Poor 2015]," & _ " IBasicSerUP_25 AS [Basic_Services_for_Urban_Poor 2025], IBasicSerUP_35 AS [Basic_Services_for_Urban_Poor 2035], " & _ " Total_IBasicSerUP AS [Basic_Services_for_Urban_Poor Total], IEnvironment_15 AS [Environment 2015], IEnvironment_25 AS [Environment 2025]," & _ " IEnvironment_35 AS [Environment 2035], Total_IEnvironment AS [Environment Total], IUrbanGov_15 AS [Urban_Governance 2015]," & _ " IUrbanGov_25 AS [Urban_Governance 2025], IUrbanGov_35 AS [Urban_Governance 2035], Total_IUrbanGov AS [Urban_Governance Total]," & _ " IHeritage_15 AS [Heritage 2015], IHeritage_25 AS [Heritage 2025], IHeritage_35 AS [Heritage 2035], Total_IHeritage AS [Heritage Total], " & _ " IEducation_15 AS [Education 2015], IEducation_25 AS [Education 2025], IEducation_35 AS [Education 2035], Total_IEducation AS [Education Total]," & _ " IHealth_15 AS [Health 2015], IHealth_25 AS [Health 2025], IHealth_35 AS [Health 2035], Total_IHealth AS [Health Total]," & _ " ISocialIOP_15 AS [Social_infra._&_Other_Project 2015], ISocialIOP_25 AS [Social_infra._&_Other_Project 2025]," & _ " ISocialIOP_35 AS [Social_infra._&_Other_Project 2035], Total_ISocialIOP AS [Social_infra._&_Other_Project Total]," & _ " ITourism_15 AS Tourism_15, ITourism_25 AS Tourism_25, ITourism_35 AS Tourism_35, Total_ITourism AS Total_Tourism, IDate AS Record_Insertion_Date" & _ " FROM dbo.TBL_CDP " Return allsql End Function Public Shared Function stringSqlrpt() As String Dim sqlString As String = "" sqlString = "SELECT CONVERT(DECIMAL(10, 2), SUM(IWaterS_2015)) AS ws15, CONVERT(DECIMAL(10, 2), SUM(IWaterS_2025)) AS ws25, CONVERT(DECIMAL(10, 2), " & _ "SUM(IWaterS_2035)) AS ws35, CONVERT(DECIMAL(10, 2), SUM(Total_IWaterS)) AS wsTot, CONVERT(DECIMAL(10, 2), SUM(ISewerage_15)) AS svg15, " & _ "CONVERT(DECIMAL(10, 2), SUM(ISewerage_25)) AS svg25, CONVERT(DECIMAL(10, 2), SUM(ISewerage_35)) AS svg35, CONVERT(DECIMAL(10, 2), " & _ "SUM(Total_ISewerage)) AS svgToT, CONVERT(DECIMAL(10, 2), SUM(IStormWaterDrain_15)) AS swd15, CONVERT(DECIMAL(10, 2), " & _ "SUM(IStormWaterDrain_25)) AS swd25, CONVERT(DECIMAL(10, 2), SUM(IStormWaterDrain_35)) AS swd35, CONVERT(DECIMAL(10, 2), " & _ "SUM(Total_IStormWaterDrain)) AS swdTot, CONVERT(DECIMAL(10, 2), SUM(ISolideWastMgt_15)) AS swmgt15, CONVERT(DECIMAL(10, 2), " & _ "SUM(ISolideWastMgt_25)) AS swmgt25, CONVERT(DECIMAL(10, 2), SUM(ISolideWastMgt_35)) AS swmgt35, CONVERT(DECIMAL(10, 2), " & _ "SUM(Total_ISolideWastMgt)) AS swmgtTot, CONVERT(DECIMAL(10, 2), SUM(ISanitation_15)) AS sne15, CONVERT(DECIMAL(10, 2), SUM(ISanitation_25)) " & _ "AS sne25, CONVERT(DECIMAL(10, 2), SUM(ISanitation_35)) AS sne35, CONVERT(DECIMAL(10, 2), SUM(Total_ISanitation)) AS sneTot, " & _ "CONVERT(DECIMAL(10, 2), SUM(ITrafic_Trans_15)) AS ttr15, CONVERT(DECIMAL(10, 2), SUM(ITrafic_Trans_25)) AS ttr25, CONVERT(DECIMAL(10, 2), " & _ "SUM(ITrafic_Trans_35)) AS ttr35, CONVERT(DECIMAL(10, 2), SUM(Total_ITrafic_Trans)) AS ttrTot, CONVERT(DECIMAL(10, 2), SUM(IElectriStrit_15)) " & _ "AS esl15, CONVERT(DECIMAL(10, 2), SUM(IElectriStrit_25)) AS esl25, CONVERT(DECIMAL(10, 2), SUM(IElectriStrit_35)) AS esl35, " & _ "CONVERT(DECIMAL(10, 2), SUM(Total_IElectriStrit)) AS eslTot, CONVERT(DECIMAL(10, 2), SUM(IFire_Fit_15)) AS ff15, CONVERT(DECIMAL(10, 2), " & _ "SUM(IFire_Fit_25)) AS ff25, CONVERT(DECIMAL(10, 2), SUM(IFire_Fit_35)) AS ff35, CONVERT(DECIMAL(10, 2), SUM(Total_IFire_Fit)) AS ffTot, " & _ "CONVERT(DECIMAL(10, 2), SUM(IBasicSerUP_15)) AS bs15, CONVERT(DECIMAL(10, 2), SUM(IBasicSerUP_25)) AS bs25, CONVERT(DECIMAL(10, 2), " & _ "SUM(IBasicSerUP_35)) AS bs35, CONVERT(DECIMAL(10, 2), SUM(Total_IBasicSerUP)) AS bsTot, CONVERT(DECIMAL(10, 2), SUM(IEnvironment_15)) " & _ "AS Env15, CONVERT(DECIMAL(10, 2), SUM(IEnvironment_25)) AS Env25, CONVERT(DECIMAL(10, 2), SUM(IEnvironment_35)) AS Env35, " & _ "CONVERT(DECIMAL(10, 2), SUM(Total_IEnvironment)) AS EnvTot, CONVERT(DECIMAL(10, 2), SUM(IUrbanGov_15)) AS ug15, CONVERT(DECIMAL(10, 2), " & _ "SUM(IUrbanGov_25)) AS ug25, CONVERT(DECIMAL(10, 2), SUM(IUrbanGov_35)) AS ug35, CONVERT(DECIMAL(10, 2), SUM(Total_IUrbanGov)) AS ugTot, " & _ "CONVERT(DECIMAL(10, 2), SUM(IHeritage_15)) AS htg15, CONVERT(DECIMAL(10, 2), SUM(IHeritage_25)) AS htg25, CONVERT(DECIMAL(10, 2), " & _ "SUM(IHeritage_35)) AS htg35, CONVERT(DECIMAL(10, 2), SUM(Total_IHeritage)) AS htgTot, CONVERT(DECIMAL(10, 2), SUM(IEducation_15)) AS edu15, " & _ "CONVERT(DECIMAL(10, 2), SUM(IEducation_25)) AS edu25, CONVERT(DECIMAL(10, 2), SUM(IEducation_35)) AS edu35, CONVERT(DECIMAL(10, 2), " & _ "SUM(Total_IEducation)) AS eduTot, CONVERT(DECIMAL(10, 2), SUM(IHealth_15)) AS hlt15, CONVERT(DECIMAL(10, 2), SUM(IHealth_25)) AS hlt25, " & _ "CONVERT(DECIMAL(10, 2), SUM(IHealth_35)) AS hlt35, CONVERT(DECIMAL(10, 2), SUM(Total_IHealth)) AS hltTot, CONVERT(DECIMAL(10, 2), " & _ "SUM(ISocialIOP_15)) AS siop15, CONVERT(DECIMAL(10, 2), SUM(ISocialIOP_25)) AS siop25, CONVERT(DECIMAL(10, 2), SUM(ISocialIOP_35)) AS siop35," & _ "CONVERT(DECIMAL(10, 2), SUM(Total_ISocialIOP)) AS siopTot " & _ " FROM dbo.TBL_CDP Where" Return sqlString End Function Public Shared Function stringtotal(ByVal coname As String, ByVal division As String, ByVal district As String, ByVal ulb As String, ByVal _mid As Integer) As String Dim sqlStringTotal As String = "" sqlStringTotal = "select (IWaterS_2015+ISewerage_15+IStormWaterDrain_15+ISolideWastMgt_15" & _ "+ISanitation_15+ITrafic_Trans_15+IElectriStrit_15 +IFire_Fit_15 + IBasicSerUP_15+IEnvironment_15+IUrbanGov_15" & _ "+IHeritage_15+IEducation_15+IHealth_15+ISocialIOP_15+ITourism_15" & _ ") Total15," & _ "(IWaterS_2025+ISewerage_25+IStormWaterDrain_25+ISolideWastMgt_25+ISanitation_25+ITrafic_Trans_25+" & _ "IElectriStrit_25+IFire_Fit_25 + IBasicSerUP_25 + IEnvironment_25 + IUrbanGov_25+ IHeritage_25 + IEducation_25 + IHealth_25 + ISocialIOP_25" & _ "+ITourism_25)Total25," & _ "(IWaterS_2035+ISewerage_35+IStormWaterDrain_35+ISolideWastMgt_35+ISanitation_35+ITrafic_Trans_35" & _ "+IElectriStrit_35+IFire_Fit_35+IBasicSerUP_35+IEnvironment_35+IUrbanGov_35+IHeritage_35+IEducation_35+" & _ " IHealth_35+ISocialIOP_35 + ITourism_35" & _ ")Total35," & _ "(Total_IWaterS+Total_ISewerage+Total_IStormWaterDrain+Total_ISolideWastMgt+" & _ "Total_ISanitation+Total_ITrafic_Trans+Total_IElectriStrit+Total_IFire_Fit+Total_IBasicSerUP+" & _ " Total_IEnvironment+Total_IUrbanGov + Total_IHeritage + Total_IEducation + Total_IHealth + Total_ISocialIOP + Total_ITourism)" & _ "allTotal" & _ " from dbo.TBL_CDP " & _ " where " & _ " Company_Name = '" & coname & "'" & _ " And Division_Name = '" & division & "'" & _ " And District_Name = '" & district & "'" & _ " And City_ULB_Name= '" & ulb & "'" & _ " And INV_ID='" & _mid & "'" Return sqlStringTotal End Function 'Private Sub LoadCompany() ' _loginID = GetLOfinId() ' ' DD_CompanyName.Items.Clear() ' Dim command As New Command("SELECT Company_ID, Company_Name FROM TBL_CompanyName WHERE Login_ID = " & _loginID & " ", False) ' Try ' command.ExecuteReader(True, False) ' If command.Reader.HasRows Then ' DD_CompanyName.DataValueField = "Company_ID" ' DD_CompanyName.DataTextField = "Company_Name" ' DD_CompanyName.DataSource = command.Reader ' DD_CompanyName.DataBind() ' If DD_CompanyName.Items.Count > 0 Then ' DD_CompanyName.Items.Insert(0, New ListItem("Company_Name", "0")) ' End If ' Else ' End If ' Finally ' command.Close() ' End Try 'End Sub End Class