15,867,568 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by narendrag999 (Top 9 by date)
narendrag999
2-Oct-12 3:22am
View
Hi sir thanks i am able to get the reports, but data inside the report is missing for one report.
And also both are generating in single window.Need to generate separately.
Hope u got me..
thanks,
Nareeen
narendrag999
25-Sep-12 23:44pm
View
Thank you sir...
narendrag999
23-Sep-12 23:10pm
View
Hi pls find the query.
Insert into temp_a2_dly_work (STORE_ID,DAILY_DATE,SALES_CCAR,SALES_PCAR,SALES_OTC,MAST_TOTAL,VOID_ORDER ,
BAD_ORDER, TOT_SALES, SALES_TAX, BOTTLE_DEP, NET_SALES, COUPONS,NON_ROYAL_SALES,ROYAL_SALES,FOOD_BOUGHT,
CUST_CHARGE,RAISE_TILL,MILEAGE,CONT_LABOR,CPO_01_DESC,CPO_01,CPO_02_DESC,CPO_02,CPO_03_DESC,CPO_03,CPO_04_DESC,
CPO_04,CPO_05_DESC,CPO_05,CPO_06_DESC,CPO_06,CPO_07_DESC,CPO_07,CPO_08_DESC,CPO_08,CPO_09_DESC,CPO_09,CPO_10_DESC,
CPO_10,CPO_11_DESC,CPO_11,CPO_12_DESC,CPO_12,CPO_13_DESC,CPO_13,CPO_14_DESC,CPO_14,CPO_15_DESC,CPO_15,CPO_TOTAL,
FOOD_SOLD,CUST_PAY,LOWER_TILL,MROTS_01_DESC,MROTS_01,MROTS_02_DESC,MROTS_02,MROTS_03_DESC,MROTS_03,MROTS_04_DESC,
MROTS_04,MROTS_05_DESC,MROTS_05,MROTS_06_DESC,MROTS_06,MROTS_07_DESC,MROTS_07,MROTS_TOTAL,TOT_ACCT,DEP_TOTAL,
CASH_OS,END_TILL,CARRY_OUT,CO_COUPON,DLRY_COUPON,LUNCH_SALE,FC_FOOD,FC_COLA,FC_PAPER,FC_NON,IFC_FOOD,
IFC_COLA,IFC_PAPER,IFC_NON,LAB_SALARY,LAB_HOURLY,LAB_INSIDE,LAB_OUTSIDE,LAB_OVERTIME,TOT_MILE,TOT_COUPON_COST,
IN_CHARGE,BEG_ORDER,END_ORDER,HOLIDAY,NUM_PIZZA,PIZZA_SALE,NUM_ORD,ORDER_SALE,TOT_ORD,COMMENT1,COMMENT2,
COMMENT3,COMMENT4,COMMENT5,COMMENT6,NUM_OT_TIME,TOT_OT_TIME,NUM_LOAD_TIME,TOT_LOAD_TIME,NUM_OTD_TIME,
TOT_OTD_TIME,NUM_DLRY_TIME,TOT_DLRY_TIME,REPORT_DATE_TIME , YEAR_PD, USERID,CRED_CARD_TOTAL,GOVT_TAX,
CRED_VISA_TOTAL,CRED_MASTER_TOTAL,CASH_SALES_TOTAL,FOOD , LABOR, COUPON1, KMETER, FOODPER, LABORPER,
COUPONPER,KMETERPER , DELCOMPPER, DELPERSPER, OTCPER,flcmcost,flcmcostper,pctotal,WEBCASH_TOTAL,TOT_ACCT_BEF_ROUND,
TOT_ACCT_ROUND_DIFF)
SELECT STORE_ID,DAILY_DATE,SALES_CCAR,SALES_PCAR,SALES_OTC,MAST_TOTAL,VOID_ORDER , BAD_ORDER, TOT_SALES, SALES_TAX, BOTTLE_DEP, NET_SALES, COUPONS,NON_ROYAL_SALES,ROYAL_SALES,FOOD_BOUGHT,CUST_CHARGE,RAISE_TILL,MILEAGE,CONT_LABOR,CPO_01_DESC,CPO_01,CPO_02_DESC,CPO_02,CPO_03_DESC,CPO_03,CPO_04_DESC,CPO_04,CPO_05_DESC,CPO_05,CPO_06_DESC,CPO_06,CPO_07_DESC,CPO_07,CPO_08_DESC,CPO_08,CPO_09_DESC,CPO_09,CPO_10_DESC,CPO_10,CPO_11_DESC,CPO_11,CPO_12_DESC,CPO_12,CPO_13_DESC,CPO_13,CPO_14_DESC,CPO_14,CPO_15_DESC,CPO_15,CPO_TOTAL,FOOD_SOLD,CUST_PAY,LOWER_TILL,MROTS_01_DESC,MROTS_01,MROTS_02_DESC,MROTS_02,MROTS_03_DESC,MROTS_03,MROTS_04_DESC,MROTS_04,MROTS_05_DESC,MROTS_05,MROTS_06_DESC,MROTS_06,MROTS_07_DESC,MROTS_07,MROTS_TOTAL,TOT_ACCT,DEP_TOTAL,CASH_OS,END_TILL,CARRY_OUT,CO_COUPON,DLRY_COUPON,LUNCH_SALE,FC_FOOD,FC_COLA,FC_PAPER,FC_NON,IFC_FOOD,IFC_COLA,IFC_PAPER,IFC_NON,LAB_SALARY,LAB_HOURLY,LAB_INSIDE,LAB_OUTSIDE,LAB_OVERTIME,TOT_MILE,TOT_COUPON_COST,IN_CHARGE,BEG_ORDER,END_ORDER,HOLIDAY,NUM_PIZZA,PIZZA_SALE,NUM_ORD,ORDER_SALE,TOT_ORD,COMMENT1,COMMENT2,COMMENT3,COMMENT4,COMMENT5,COMMENT6,NUM_OT_TIME,TOT_OT_TIME,NUM_LOAD_TIME,TOT_LOAD_TIME,NUM_OTD_TIME,TOT_OTD_TIME,NUM_DLRY_TIME,TOT_DLRY_TIME,REPORT_DATE_TIME , YEAR_PD, 'MIS',CRED_CARD_TOTAL,GOVT_TAX,CRED_VISA_TOTAL,CRED_MASTER_TOTAL,CASH_SALES_TOTAL,'14226.93','17026.94','527.2','4.6','1053.61','1260.97','39.04','0.34','78.27','0','18.16','31785.67','2353.96','0',WEBCASH_TOTAL,TOT_ACCT_BEF_ROUND,TOT_ACCT_ROUND_DIFF from a2_dly_work where store_id = '85004' and daily_date = 'YYYY-MM-DD'
Thanks,
Naren
narendrag999
23-Sep-12 22:37pm
View
thank you..
narendrag999
18-Sep-12 3:22am
View
Hello Sir,
Need some info for my question if possible
Thanks,
Narrin
narendrag999
18-Sep-12 1:04am
View
Hello sir Below is the code in Parent Page for Update Button Click:
Protected Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles cmdUpdate.Click
strPWDate = txtPWdate.Text
Dim ans
''Dim EOD_Flag As String 'cmt 13/05/2010 move to top declaration
glob_auto_update_paperwork_YN = "N" 'NEED TO DELETE THIS LINE LATER 11.08.2012 @ 412PM
If glob_auto_update_paperwork_YN = "N" Then 'add if st 25/06/2012
If Session("BlnIndreport") = False Then
gFrmName = "frmPWPaperWork"
If genFunction.RetNum(genFunction.Basic_SecAccess(gFrmName)) > 0 Then
If Session(" gCancel") = False Then
If genFunction.SecAccess(gFrmName) Then
'continue update
Else
'Exit Sub 'HIGHER LEVEL NEEDED
End If
Else
Exit Sub
End If
Else
Exit Sub
End If
End If
End If
'ADD 03/01/2011 to update Accident no of incidents
txtAccIncid.Text = Replace(txtAccIncid.Text, "-", "") 'add 02/03/2011
Dim strSQL As String = ""
strSQL = "select ORT_DATE "
strSQL = strSQL + " FROM A2_SIU_EXTRA_INFO "
strSQL = strSQL + " Where ORT_DATE = '" & genFunction.GetMYSQLDate(strPWDate) & "' "
Dim DT As New DataTable
DT = oDBHelper.ExecuteDataTable(CommandType.Text, strSQL)
If Not DT.Rows.Count > 0 Then
strSQL = ""
strSQL = "insert into A2_SIU_EXTRA_INFO "
strSQL = strSQL & "(ORT_DATE,Accident_Incident) "
strSQL = strSQL & " values("
strSQL = strSQL & " '" & genFunction.GetMYSQLDate(strPWDate) & "','" & genFunction.RetNum(Trim(txtAccIncid.Text)) & "')"
oDBHelper.ExecuteNonQuery(CommandType.Text, strSQL)
Else
strSQL = ""
strSQL = "update A2_SIU_EXTRA_INFO set"
strSQL = strSQL & " Accident_Incident = '" & genFunction.RetNum(Trim(txtAccIncid.Text)) & "' "
strSQL = strSQL + " Where ORT_DATE = '" & genFunction.GetMYSQLDate(strPWDate) & "' "
oDBHelper.ExecuteNonQuery(CommandType.Text, strSQL)
End If
'END 03/01/2011
'add 25/06/2012
If glob_auto_update_paperwork_YN = "Y" Then
If CDate(txtPWdate.Text) = CDate(genFunction.FindProDate) Then
Call Update_Insert_Paperwork()
Exit Sub
Else 'not process date, so don't update
Exit Sub
End If
End If
'end 25/06/2012
'add 12/02/2010 'avoid update paperwork from report
If Session("BlnIndreport") = True Then
If CDate(strPWDate) <> CDate(genFunction.FindProDate) Then
Exit Sub
End If
End If
'end 12/02/2010
If Cmd_Chk = False Then
'add 04/07/2008 to avoid paperwork sometimes no record
'add 13/05/2010 to make insert/update as seperate procedure
Call Update_Insert_Paperwork()
If Session("BlnIndreport") = False Then
If chkEOD.Checked = True Then
ans = ConfirmEOD()
If ans = vbNo Then
'Resp = MsgBox(genFunction.Get_Mesg_Desc("PW-01"), vbOKOnly + vbExclamation, "Message")
MsgBox(genFunction.Get_Mesg_Desc("PW-01"), vbOKOnly + vbExclamation, "Message")
Exit Sub
End If
End If
End If
'add 13/05/2010 to make insert/update as seperate procedure
Chk_flag = False
narendrag999
18-Sep-12 1:04am
View
Hello sir Below is the code in Parent Page for Update Button Click:
Protected Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles cmdUpdate.Click
strPWDate = txtPWdate.Text
Dim ans
''Dim EOD_Flag As String 'cmt 13/05/2010 move to top declaration
glob_auto_update_paperwork_YN = "N" 'NEED TO DELETE THIS LINE LATER 11.08.2012 @ 412PM
If glob_auto_update_paperwork_YN = "N" Then 'add if st 25/06/2012
If Session("BlnIndreport") = False Then
gFrmName = "frmPWPaperWork"
If genFunction.RetNum(genFunction.Basic_SecAccess(gFrmName)) > 0 Then
If Session(" gCancel") = False Then
If genFunction.SecAccess(gFrmName) Then
'continue update
Else
'Exit Sub 'HIGHER LEVEL NEEDED
End If
Else
Exit Sub
End If
Else
Exit Sub
End If
End If
End If
'ADD 03/01/2011 to update Accident no of incidents
txtAccIncid.Text = Replace(txtAccIncid.Text, "-", "") 'add 02/03/2011
Dim strSQL As String = ""
strSQL = "select ORT_DATE "
strSQL = strSQL + " FROM A2_SIU_EXTRA_INFO "
strSQL = strSQL + " Where ORT_DATE = '" & genFunction.GetMYSQLDate(strPWDate) & "' "
Dim DT As New DataTable
DT = oDBHelper.ExecuteDataTable(CommandType.Text, strSQL)
If Not DT.Rows.Count > 0 Then
strSQL = ""
strSQL = "insert into A2_SIU_EXTRA_INFO "
strSQL = strSQL & "(ORT_DATE,Accident_Incident) "
strSQL = strSQL & " values("
strSQL = strSQL & " '" & genFunction.GetMYSQLDate(strPWDate) & "','" & genFunction.RetNum(Trim(txtAccIncid.Text)) & "')"
oDBHelper.ExecuteNonQuery(CommandType.Text, strSQL)
Else
strSQL = ""
strSQL = "update A2_SIU_EXTRA_INFO set"
strSQL = strSQL & " Accident_Incident = '" & genFunction.RetNum(Trim(txtAccIncid.Text)) & "' "
strSQL = strSQL + " Where ORT_DATE = '" & genFunction.GetMYSQLDate(strPWDate) & "' "
oDBHelper.ExecuteNonQuery(CommandType.Text, strSQL)
End If
'END 03/01/2011
'add 25/06/2012
If glob_auto_update_paperwork_YN = "Y" Then
If CDate(txtPWdate.Text) = CDate(genFunction.FindProDate) Then
Call Update_Insert_Paperwork()
Exit Sub
Else 'not process date, so don't update
Exit Sub
End If
End If
'end 25/06/2012
'add 12/02/2010 'avoid update paperwork from report
If Session("BlnIndreport") = True Then
If CDate(strPWDate) <> CDate(genFunction.FindProDate) Then
Exit Sub
End If
End If
'end 12/02/2010
If Cmd_Chk = False Then
'add 04/07/2008 to avoid paperwork sometimes no record
'add 13/05/2010 to make insert/update as seperate procedure
Call Update_Insert_Paperwork()
If Session("BlnIndreport") = False Then
If chkEOD.Checked = True Then
ans = ConfirmEOD()
If ans = vbNo Then
'Resp = MsgBox(genFunction.Get_Mesg_Desc("PW-01"), vbOKOnly + vbExclamation, "Message")
MsgBox(genFunction.Get_Mesg_Desc("PW-01"), vbOKOnly + vbExclamation, "Message")
Exit Sub
End If
End If
End If
'add 13/05/2010 to make insert/update as seperate procedure
Chk_flag = False
narendrag999
18-Sep-12 0:55am
View
Hi Code for Modal Popup:
Partial Class Paperwork_frmALPassword
Inherits System.Web.UI.Page
Dim glob_SecurityLoginEmpID As String
Dim omodglobal As New modGlobal
Dim odbHelper As New DBHelper
Dim dt As DataTable
Dim SqlStr As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("glob_formAccID") = "" Then
'frmALPassword.Caption = "Security Login"
Else
'frmSecurity.Caption = "Access Level " + omodglobal.glob_formAccID + " Password Required"
End If
Session("gUserAccess") = 0
Session("gCancel") = False
Session("glob_formAccID") = ""
End Sub
Protected Sub cmdOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOk.Click
Session("glob_SecurityLoginEmpID") = ConnectionInfo.LoggedInUser.UserID
If Trim(txtUserID.Text) = "" And Trim(txtPassword.Text) = "" Then
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-01"), Me)
txtUserID.Focus()
Exit Sub
End If
If Trim(txtPassword.Text) = "" Then
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-03"), Me)
txtPassword.Focus()
Exit Sub
End If
SqlStr = "select ESC_ACCESS_ID " & _
" from EMP_ESC_EMPSECURITY " & _
" where ESC_EMP_ID='" & omodglobal.Sqt2Dqt(omodglobal.Sbs2Dbs(txtUserID.Text)) & "'" & _
" and ESC_PASSWORD='" & omodglobal.Encrypt((omodglobal.Sqt2Dqt(omodglobal.Sbs2Dbs(txtPassword.Text)))) & "'"
dt = odbHelper.ExecuteDataTable(CommandType.Text, SqlStr)
If dt.Rows.Count > 0 Then
Session("gUserAccess") = omodglobal.RetStr(dt.Rows(0).Item(0))
Session("glob_SecurityLoginEmpID") = Trim(txtUserID.Text)
Session("globchk") = True
ScriptManager.RegisterClientScriptBlock(Me, Me.[GetType](), "window", "javascript:window.close();", True
Else
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-04"), Me)
txtPassword.Text = ""
txtPassword.Focus()
Exit Sub
End If
End Sub
Protected Sub cmdCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
Session("gCancel") = True
ScriptManager.RegisterClientScriptBlock(Me, Me.[GetType](), "window", "javascript:window.close();", True)
End Sub
narendrag999
18-Sep-12 0:53am
View
Hi Code for Modal Popup:
Partial Class Paperwork_frmALPassword
Inherits System.Web.UI.Page
Dim glob_SecurityLoginEmpID As String
Dim omodglobal As New modGlobal
Dim odbHelper As New DBHelper
Dim dt As DataTable
Dim SqlStr As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("glob_formAccID") = "" Then
'frmALPassword.Caption = "Security Login"
Else
'frmSecurity.Caption = "Access Level " + omodglobal.glob_formAccID + " Password Required"
End If
Session("gUserAccess") = 0
Session("gCancel") = False
Session("glob_formAccID") = ""
End Sub
Protected Sub cmdOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOk.Click
Session("glob_SecurityLoginEmpID") = ConnectionInfo.LoggedInUser.UserID
If Trim(txtUserID.Text) = "" And Trim(txtPassword.Text) = "" Then
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-01"), Me)
txtUserID.Focus()
Exit Sub
End If
If Trim(txtPassword.Text) = "" Then
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-03"), Me)
txtPassword.Focus()
Exit Sub
End If
SqlStr = "select ESC_ACCESS_ID " & _
" from EMP_ESC_EMPSECURITY " & _
" where ESC_EMP_ID='" & omodglobal.Sqt2Dqt(omodglobal.Sbs2Dbs(txtUserID.Text)) & "'" & _
" and ESC_PASSWORD='" & omodglobal.Encrypt((omodglobal.Sqt2Dqt(omodglobal.Sbs2Dbs(txtPassword.Text)))) & "'"
dt = odbHelper.ExecuteDataTable(CommandType.Text, SqlStr)
If dt.Rows.Count > 0 Then
Session("gUserAccess") = omodglobal.RetStr(dt.Rows(0).Item(0))
Session("glob_SecurityLoginEmpID") = Trim(txtUserID.Text)
Session("globchk") = True
ScriptManager.RegisterClientScriptBlock(Me, Me.[GetType](), "window", "javascript:window.close();", True
Else
omodglobal.MesssgeBox(omodglobal.Get_Mesg_Desc("SE-04"), Me)
txtPassword.Text = ""
txtPassword.Focus()
Exit Sub
End If
End Sub
Protected Sub cmdCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
Session("gCancel") = True
ScriptManager.RegisterClientScriptBlock(Me, Me.[GetType](), "window", "javascript:window.close();", True)
End Sub
Code in Parent Page with Update Button event:
Protected Sub cmdUpdate_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles cmdUpdate.Click
strPWDate = txtPWdate.Text
Dim ans
glob_auto_update_paperwork_YN = "N" 'NEED TO DELETE THIS LINE LATER 11.08.2012 @ 412PM
If glob_auto_update_paperwork_YN = "N" Then 'add if st 25/06/2012
If Session("BlnIndreport") = False Then
gFrmName = "frmPWPaperWork"
If genFunction.RetNum(genFunction.Basic_SecAccess(gFrmName)) > 0 Then
If Session(" gCancel") = False Then
If genFunction.SecAccess(gFrmName) Then
'continue update
Else
'Exit Sub 'HIGHER LEVEL NEEDED
End If
Else
Exit Sub
End If
Else
Exit Sub
End If
End If
End If
'ADD 03/01/2011 to update Accident no of incidents
txtAccIncid.Text = Replace(txtAccIncid.Text, "-", "") 'add 02/03/2011
Dim strSQL As String = ""
strSQL = "select ORT_DATE "
strSQL = strSQL + " FROM A2_SIU_EXTRA_INFO "
strSQL = strSQL + " Where ORT_DATE = '" & genFunction.GetMYSQLDate(strPWDate) & "' "
Dim DT As New DataTable
DT = oDBHelper.ExecuteDataTable(CommandType.Text, strSQL)
If Not DT.R
Show More