Click here to Skip to main content
15,920,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAccessing tags on a Master page [modified] Pin
Alaric_23-Apr-07 10:23
professionalAlaric_23-Apr-07 10:23 
AnswerRe: Accessing tags on a Master page Pin
szukuro23-Apr-07 22:44
szukuro23-Apr-07 22:44 
GeneralRe: Accessing tags on a Master page Pin
Alaric_24-Apr-07 9:03
professionalAlaric_24-Apr-07 9:03 
Questioncalling stored proc in a loop Pin
drequinox23-Apr-07 9:58
drequinox23-Apr-07 9:58 
AnswerRe: calling stored proc in a loop Pin
Christian Graus23-Apr-07 11:07
protectorChristian Graus23-Apr-07 11:07 
AnswerRe: calling stored proc in a loop Pin
Colin Angus Mackay23-Apr-07 11:47
Colin Angus Mackay23-Apr-07 11:47 
GeneralRe: calling stored proc in a loop Pin
drequinox23-Apr-07 23:51
drequinox23-Apr-07 23:51 
Questionconn string property Pin
Hasan Ali23-Apr-07 7:43
Hasan Ali23-Apr-07 7:43 
Code behind - .aspx.vb

Partial Class Ce_PerfMeasVW
Inherits System.Web.UI.Page
Dim cetrend_view As String
Dim cetrend_pmeasure As String
Dim cetrend_ptitle As String
Dim objBaseClass As BusinessObjectBase
Dim CePM_BusinessObj As Construction_Bll
Dim p_measure As String()
Dim inf_factor As Boolean
Dim view_type As String
Dim from_dates As String()
Dim to_dates As String()
Dim Dt_CePM As DataTable
Dim dal_obj As Construction_Dal
Dim a As String


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Page.IsPostBack = False Then

'cetrend_view = Session("view_type")
'cetrend_pmeasure = Session("p_measure")
'cetrend_ptitle = Session("page_title")



cetrend_view = Request.QueryString("v_type").ToString()
cetrend_pmeasure = Request.QueryString("p_meas").ToString()
cetrend_ptitle = Request.QueryString("p_title").ToString()

lbl_ce_perfmeashd.Text = cetrend_ptitle

p_measure = New String() {0, 1}
p_measure = Split(cetrend_pmeasure, ("-"), (-1))

inf_factor = chk_ce_perfmeasinf.Checked

view_type = ddl_ce_perfmeasvw.SelectedItem.Value

If rb_ce_perfmeasmon.Checked Then
objBaseClass = New BusinessObjectBase
from_dates = New String() {0, 1}
from_dates = objBaseClass.get_month_year(ddl_ce_perfmeasyrs1.SelectedItem.Value, ddl_ce_perfmeasmon1.SelectedItem.Value)
to_dates = New String() {0, 1}
to_dates = objBaseClass.get_month_year(ddl_ce_perfmeasyrs2.SelectedItem.Value, ddl_ce_perfmeasmon2.SelectedItem.Value)
ElseIf rb_ce_perfmeasqtr.Checked Then
objBaseClass = New BusinessObjectBase
from_dates = New String() {0, 1}
from_dates = objBaseClass.get_quater_year(ddl_ce_perfmeasyrs3.SelectedItem.Value, ddl_ce_perfmeasqtr1.SelectedItem.Value)
to_dates = New String() {0, 1}
to_dates = objBaseClass.get_quater_year(ddl_ce_perfmeasyrs4.SelectedItem.Value, ddl_ce_perfmeasqtr2.SelectedItem.Value)
End If
dal_obj = New Construction_Dal
dal_obj.con() = ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString()


CePM_BusinessObj = New Construction_Bll
Dt_CePM = CePM_BusinessObj.CePerfMeas_Retrive(p_measure, inf_factor, view_type, from_dates, to_dates)


'Session.Contents.RemoveAll()
End If

Catch ex As Exception

End Try




End Sub
End Class


**********************************************************************






Public Class Construction_Bll
Inherits BusinessObjectBase

Dim obj As Construction_Dal

Dim cost_type1 As String
Dim cost_type2 As String
Dim infl_factor As Boolean
Dim view_typ As String
Dim main_fdate As Date
Dim main_tdate As Date
Dim Dt_CePM As DataTable


Public Function CePerfMeas_Retrive(ByVal p_measure As String(), ByVal inf_factor As Boolean, ByVal view_type As String, ByVal from_dates As String(), ByVal to_dates As String()) As DataTable
Dim Dt_BegEst As DataTable
Dim Dt_EndEst As DataTable
cost_type1 = p_measure(0)
cost_type2 = p_measure(1)
infl_factor = inf_factor
view_typ = view_type
main_fdate = Convert.ToDateTime(from_dates(0))
main_tdate = Convert.ToDateTime(to_dates(0))
main_fdate = Format(main_fdate, "MM, dd, yyyy")
main_tdate = Format(main_tdate, "MM, dd, yyyy")
obj = New Construction_Dal

Dt_BegEst = obj.CePerfMeas_data(cost_type1, cost_type2, view_typ, main_fdate, main_tdate)

Dt_EndEst = obj.CePerfMeas_data(cost_type2, cost_type1, view_typ, main_fdate, main_tdate)


Return Dt_CePM

End Function




***********************************************************************





Public Class Construction_Dal
Inherits BusinessObjectBase


Public conn As OleDb.OleDbConnection
Dim a As String
Public Property con() As String

Get
Return a
End Get
Set(ByVal value As String)
a = value

End Set
End Property


#Region "Estimate measure Trends"
Public Function CePerfMeas_data(ByVal cost_type1 As String, ByVal cost_type2 As String, ByVal view_type As String, ByVal main_fdate As Date, ByVal main_tdate As Date) As DataTable
Dim Dt_CePM As New DataTable()
Dim Sql_CePerfMeas1 As String
Dim dbcomm As OleDb.OleDbCommand
Dim str As String
str = con()
conn = New OleDb.OleDbConnection(str)

Sql_CePerfMeas1 = "select sum(CST_TYP_AMT), to_char(inside.CST_TYP_DT,'MM/01/yyyy') from IEIT002_CONTESTM,(Select to_char(CST_TYP_DT,'MM/01/yyyy') from IEI where CNSTESTM_CSTTYP_CD = " & cost_type2 & " and CST_TYP_DT between " & main_fdate & " and " & main_tdate & ") inside where CNSTESTM_CSTTYP_CD = " & cost_type1 & " and WPITEM || WPITMSEG || WPPHAZGP || WPPHAZTP || FINPRJSQ in (select WPITEM || WPITMSEG || WPPHAZGP || WPPHAZTP || FINPRJSQ where CNSTESTM_CSTTYP_CD = " & cost_type2 & " and CST_TYP_DT between " & main_fdate & " and " & main_tdate & ") "
dbcomm = New OleDb.OleDbCommand(Sql_CePerfMeas1, conn)
Dim da As New OleDb.OleDbDataAdapter(dbcomm)
da.Fill(Dt_CePM)


Return Dt_CePM
End Function


GeneralStop spamming the forum. Pin
Guffa23-Apr-07 8:49
Guffa23-Apr-07 8:49 
AnswerRe: conn string property Pin
Christian Graus23-Apr-07 11:08
protectorChristian Graus23-Apr-07 11:08 
QuestionBarCode Generation Pin
adnanrafiq23-Apr-07 6:43
adnanrafiq23-Apr-07 6:43 
AnswerRe: BarCode Generation Pin
Christian Graus23-Apr-07 11:15
protectorChristian Graus23-Apr-07 11:15 
QuestionMissing Properties Pin
Goudax23-Apr-07 5:32
Goudax23-Apr-07 5:32 
QuestionHow to Receive and Send Payment TO QuickBooks 2005 Pin
Software_Guy_12323-Apr-07 5:20
Software_Guy_12323-Apr-07 5:20 
Questiondatatable manuplation Pin
Hasan Ali23-Apr-07 5:03
Hasan Ali23-Apr-07 5:03 
AnswerRe: datatable manuplation Pin
Hasan Ali23-Apr-07 5:04
Hasan Ali23-Apr-07 5:04 
QuestionHow to write code for CreateUserWizard1 control ? Pin
Care Career23-Apr-07 3:20
Care Career23-Apr-07 3:20 
Questionchanging url of browser Pin
Imran Khan Pathan23-Apr-07 3:02
Imran Khan Pathan23-Apr-07 3:02 
AnswerRe: changing url of browser Pin
_AK_23-Apr-07 19:52
_AK_23-Apr-07 19:52 
Questionlogin form + asp.net 2.0 + c# Pin
ritu432123-Apr-07 2:52
ritu432123-Apr-07 2:52 
AnswerRe: login form + asp.net 2.0 + c# Pin
szukuro23-Apr-07 2:59
szukuro23-Apr-07 2:59 
GeneralRe: login form + asp.net 2.0 + c# Pin
ritu432123-Apr-07 3:12
ritu432123-Apr-07 3:12 
GeneralRe: login form + asp.net 2.0 + c# Pin
szukuro23-Apr-07 4:20
szukuro23-Apr-07 4:20 
QuestionPassword Protection Pin
.NET- India 23-Apr-07 2:31
.NET- India 23-Apr-07 2:31 
AnswerRe: Password Protection Pin
Amr Abdel-Mohsen23-Apr-07 2:48
Amr Abdel-Mohsen23-Apr-07 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.