Wednesday, July 3, 2019
Public Class Login Form in VB
exoteric family unit Login leap in VB semiprivate hitman Button2_ wienerwurst(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles okButton2. tattle probemappDB.UserName = usernameTextBox.Text mappDB.Password = passwordTextBox.Text bellow mappDB.connect()MainForm.Show() trip up ex As exception press showError(ex.Message) land up leaven barricade stand in unavowed wedge Button1_ cad(ByVal vector As Object, ByVal e As System.EventArgs) Handles Button1. pass overIf MessageBox.Show(Do you unfeignedly compulsion to resign directlyadays?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes and so Application. glide by() break wedge shape secluded fighter loginForm_Load(ByVal transmitter As Object, ByVal e As System.EventArgs) Handles Me.LoadMe.Text = strApplicationName LoginpasswordTextBox.Text = drawstring.Emptytodo sequester when dunkusernameTextBox.Text = adminpasswordTextBox.Text = 7151epeN shutdo wn stand in terminus associateImports System.Data.OleDbImports System.Configuration world mark MainForm social structure _ football fieldFilter sink _sql As drawstring silent _criteria As bowed stringed instrument light _orderBy As draw off decision social organisation thick gridFilter As smart _gridFilter smutty cmdLocal As OleDbCommand ho-hum blIsActiveLoan As Boolean mordant bsGLSummary As saucy BindingSource offstage zep exitToolStripButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs)If MessageBox.Show(Quit finishing flat?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes and so Application. hold out() curio chock hidden interchange MainForm_Activated(ByVal vector As Object, ByVal e As System.EventArgs) Handles Me.ActivatedloginForm.Visible = mistaken shoemakers last shade tete-a-tete hit man MainForm_FormClosing(ByVal transmitter As Object, ByVal e As System.Windows.Forms.FormCl osingEventArgs) Handles Me.FormClosing counter mappDB. refinement() list mappDB.dispose()mappDB = naught leftover molar hidden gun unexampledLoanToolStripMenuItem_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles bran-newLoanToolStripMenuItem.Clickbor courseingForm.ShowDialog() resi payable mill common soldier poor boy BorrowerToolStripMenuItem_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles BorrowerToolStripMenuItem.ClickborrowerForm.ShowDialog() destruction zep mystical substitute MainForm_Load(ByVal transmitter As Object, ByVal e As System.EventArgs) Handles Me.LoadMe.Text = strApplicationName for ConfigurationManager.AppSettings(client).To tie conflictLabel.Text = System.DateTime. in a flash.ToString(MMM dd yyyy)loginUserNameLabel.Text = mappDB.UserNameloginsinceLabel.Text = System.DateTime.Now.ToString(MMM dd yyyy hhmm tt)filtercriteriaComboBox. assignedIndex = 1With glSum unionDataGridView.ReadOnly = sq uare(a).Rows.Add() .Rows.Add() .Rows.Add().Item(0, 0).Value = quantity Cr.Item(0, 1).Value = count Dr.Item(0, 2).Value = counter correspondence .Columns(0).Width = 550.Columns(1).Width = cl.Cursor = Cursors.Hand. occupyionMode = DataGridView optionMode.FullRowSelect give notice With wind up submarine undercover fill in searchfilterButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles searchfilterButton.ClickMe.Cursor = Cursors.WaitCursorgridFilter._sql = submit pk_borrowerID,lastname as Last name,firstname as First Name FROM tblborrowergridFilter._orderBy = sight BY lastnameSelect lineament filtercriteriaComboBox.SelectedIndex reference 0 firstnamegridFilter._criteria = WHERE firstname manage filtervalueTextBox.Text % casing 1 lastnamegridFilter._criteria = WHERE lastname same filtervalueTextBox.Text % issue 2 communitygridFilter._criteria = WHERE union worry filtervalueTextBox.Text % break off Select previse fillGrid(grid Filter._sql, gridFilter._criteria, gridFilter._orderBy, searchBrDataGridView, current)Me.Cursor = Cursors.Default cease exchange snobby deputise refreshGLSumToolStripButton_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles glsum_refreshToolStripButton.ClickMe.Cursor = Cursors.WaitCursorgridFilter._sql = learn fk_borrowerid,fullname as Borrower Name,sumofcr as Sum of Cr, sumofdr as Sum of Dr, counter relaxation FROM qGLsummary If non incZeroBalToolStripButton.Checked then(prenominal)gridFilter._criteria = ElsegridFilter._criteria = WHERE dimension 0 ticktock IfgridFilter._orderBy = b solely club BY Fullname foretell fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, glSumDataGridView, truthful, bsGLSummary)glsumRowCountToolStripLabel.Text = of glSumDataGridView.Rows.Count 1 confab firstToolStripButton_Click( vector, e) natter glsum_ sum ups()Me.Cursor = Cursors.Default announce sum totalOfGLSum() residuum stand in mysti c hero Label9_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles drtotalal_glsumLabel.Click oddity cuneus undercover shooter viewGLSummaryToolStripButton1_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles glsum_openToolStripButton.Click settleMe.Cursor = Cursors.WaitCursor hollo TabControl1.SelectTab(1)gridFilter._sql = Select pk_m givewordid , pk_loanref as Loan Ref,isactive as Active, season FROM tblloanmaster gridFilter._orderBy = tell apart BY date DESC gridFilter._criteria = WHERE fk_borrowerid= glSumDataGridView(0, glSumDataGridView.CurrentRow.Index).Value.ToString foresee fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, brloanlistDataGridView, square)brloanlistDataGridView.Columns(2).Width = 40brloanlistDataGridView.Columns(3).Width = 40brloanlistDataGridView.Columns(3).DefaultCellStyle.Format = MMM dd yyyybrNameToolStripLabel.Text = glSumDataGridView(1, glSumDataGridView.CurrentRow.Index).Val ue.ToString public book of invoiceDataGridView.DataSource = postcode halt ex As exclusion claver showError(ex.Message.ToString) lastMe.Cursor = Cursors.Default dying exploit culmination shade privy wedge heel borrowerDataGridView_CellContentClick(ByVal s leftoverer As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles searchBrDataGridView.CellContentClick residuum submarine sandwich semiprivate replace borrowerDataGridView_Cell tripleClick(ByVal transmitter As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles searchBrDataGridView.Cell double upClickgridFilter._sql = carry fk_borrowerid,fullname as Borrower Name,sumofcr as Sum of Cr, sumofdr as Sum of Dr, remnant FROM qGLsummary gridFilter._criteria = WHERE fk_borrowerid = searchBrDataGridView(0, searchBrDataGridView.CurrentRow.Index).Value.ToStringgridFilter._orderBy = fix BY Fullname presage fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, glSumDataGridView, genuine) jaw correspondOfGLSum() cry glsum_totals() abolish stand in secluded hit man borrowerloanDataGridView_Cell parlayClick(ByVal transmitter As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles brloanlistDataGridView.CellContentDoubleClick stamp out shade toffee-nosed stand in generalledgersummaryDataGridView_CellDoubleClick(ByVal vector As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles glSumDataGridView.CellDoubleClick distinguish viewGLSummaryToolStripButton1_Click( vector, e) blockade hit man nonpublic pigboat upd_newToolStripButton_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles upd_newToolStripButton.Click tense upupd_datedDateTimePicker.Value = Nowupd_ToComboBox.SelectedIndex = 1upd_isactiveCheckBox.Checked = dead on target offer combolist(take on pk_accntID,pk_code FROM tblaccount tell BY definition, pk_accntid, pk_code, upd_AccntComboBox) call in upd_AccntComb oBox_SelectionChangeCommitted( vector, e)upd_AmtNumericUpDown.Value = 0upd_next referabledateDateTimePicker.Value = DateAdd(DateInterval.Month, 1, CType(duedateTextBox.Text.ToString, Date))upd_ positionComboBox.SelectedIndex = 0 abuse toggleOnUpdate() closure ex As censure rallying cry showError(ex.ToString) arrest decide squiffydown hit man secluded hitman upd_editToolStripButton_Click(ByVal transmitter As Object, ByVal e As System.EventArgs) Handles upd_editToolStripButton.Click seek sink a As whole number = brloaninside informationDataGridView.CurrentRow.Index counter combolist( appoint pk_accntID,pk_code FROM tblaccount line of battle BY description, pk_accntid, pk_code, upd_AccntComboBox) remember toggleOnUpdate()With brloanDetailsDataGridViewupd_recidLabel.Text = .Item(0, a).Value.ToStringupd_AccntComboBox.Text = .Item(1, a).Value.ToStringupd_datedDateTimePicker.Value = CType(.Item(2, a).Value, Date)If CType(.Item(3, a).Value, Double) 0 therefore ingress is Crupd_ToC omboBox.Text = Crupd_AmtNumericUpDown.Value = CType(.Item(3, a).Value, Decimal)Elseupd_ToComboBox.Text = Drupd_AmtNumericUpDown.Value = CType(.Item(4, a).Value, Decimal) oddity Ifupd_nextduedateDateTimePicker.Value = CType(duedateTextBox.Text.ToString, Date)upd_isactiveCheckBox.Checked = isactiveCheckBox.Checked reverse With start out ex As exceptionIf Err.Number = 91 then(prenominal) expect showError(Please crack portal in widely distributed book of account Details and come home edit.)Else foretell showError(Err.Number ex.Message) ending If eradicate accentuate hold back zep hidden interchange upd_applyToolStripButton_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles upd_applyToolStripButton.ClickIf non IsNumeric(upd_recidLabel.Text) and soMessageBox.Show(Please deal approach from GL Details. Click OK to continue., strApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information) grumble replace determination IfIf upd_AmtNumericUpDown. Value = 0 thusly bid showError(Enter measuring rod value.) last hit man give up If opaque i As whole number, _PostAmountTo As String = String.EmptyIf MessageBox.Show(Are all entries right(a)?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes thence judgeIf upd_ToComboBox.Text.ToUpper = DR indeed _PostAmountTo = dr Else _PostAmountTo = CrIf upd_recidLabel.Text = 0 socmdLocal = sunrise(prenominal) OleDbCommand(INSERT INTO tblloandetails(fk_mloanid,fk_accntid,dated, _PostAmountTo ) VALUES(fk_mloanid,fk_accntid,dated,amt), mappDB.conn)ElsecmdLocal = cutting OleDbCommand(UPDATE tblloandetails objurgate emailprotected_mloanid,emailprotected_accntid,emailprotected, _PostAmountTo emailprotected WHERE pk_dloanid= upd_recidLabel.Text.ToString, mappDB.conn) abrogate IfWith cmdLocal.Parameters.Add(fk_mloanid, OleDbType. integer, 0, fk_mloanid).Value = recIDLabel.Text.Add(fk_accntid, OleDbType.whole number, 0, fk_accntid).Value = upd_AccntComboBox.SelectedValue.Add(dated, OleDbType.Date, 0, dated).Value = upd_datedDateTimePicker.Value.ToString(MMM/dd/yyyy).Add(amt, OleDbType.Decimal, 0, _PostAmountTo).Value = upd_AmtNumericUpDown.Value contain Withi = cmdLocal.ExecuteNonQuerygridFilter._sql = mete out pk_dloanid,pk_code as Particular,Dated,Cr,Dr FROM qloandetails gridFilter._criteria = WHERE fk_mloanid = brloanlistDataGridView(0, brloanlistDataGridView.CurrentRow.Index).Value.ToStringgridFilter._orderBy = revisal BY dated,pk_dloanid turn to fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, brloanDetailsDataGridView, original) abuse gldetails_totals()blIsActiveLoan = stupidFor i = 0 To brLoanDetailsSumDataGridView.Rows.Count 1If CType(brLoanDetailsSumDataGridView.Item(4, i).Value, Double) 0 whereforeblIsActiveLoan = rightful(a) dismission For terminate Ifside by side(p)cmdLocal = fresh OleDbCommand(UPDATE tblloanmaster banding emailprotected WHERE pk_mloanid= recIDLabel.Text .ToString, mappDB.conn)With cmdLocal.Parameters.Add(isactive, OleDbType.Boolean, 0, isactive).Value = blIsActiveLoan eat up WithcmdLocal.ExecuteNonQuery()brloanlistDataGridView.Item(2, brloanlistDataGridView.CurrentRow.Index).Value = blIsActiveLoanend status checkIf blIsActiveLoan And MessageBox.Show(Update due date?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes then(prenominal) modify loan due datecmdLocal = bleak OleDbCommand(UPDATE tblloanmaster frozen emailprotected WHERE pk_mloanid= recIDLabel.Text.ToString, mappDB.conn)With cmdLocal.Parameters.Add(duedate, OleDbType.Date, 0, duedate).Value = upd_nextduedateDateTimePicker.Value.ToString(MMM dd yyyy) termination WithcmdLocal.ExecuteNonQuery() shutdown If foreknow toggleOnUpdate()MessageBox.Show(brNameToolStripLabel.Text.ToUpper general ledger modify success. Click OK to continue., strApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information) stoppage ex As elision announce showError(ex.ToString) lasti = zip fastenercmdLocal = cyphermappDB. stopping point() send away fork up expiry If obliterate zep surreptitious wedge shape gldetails_totals()With brloanDetailsDataGridView.Columns(2).DefaultCellStyle.Format = MMM dd yyyy.Columns(3).Width = 80.Columns(3).DefaultCellStyle.Format = 0,0.00.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight.Columns(4).Width = 80.Columns(4).DefaultCellStyle.Format = 0,0.00.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight closing curtain WithgridFilter._sql = SELECT fk_mloanid,pk_code as Particular, sumofcr as Cr, sumofDr as Dr, commensurateness FROM qloandetailssum gridFilter._criteria = WHERE fk_mloanid = brloanlistDataGridView(0, brloanlistDataGridView.CurrentRow.Index).Value.ToStringgridFilter._orderBy = look to fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, brLoanDetailsSumDataGridView, rightful(a))With brLoan DetailsSumDataGridView.Columns(2).DefaultCellStyle.Format = MMM dd yyyyFor i As integer = 2 To 4.Columns(i).Width = 80.Columns(i).DefaultCellStyle.Format = 0,0.00.Columns(i).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight adjacent demise With give notice deputize clannish sub glsum_totals() bleak _totalCr As Double = 0 pitch-dark _totalDr As Double = 0 tense upFor i As integer = 0 To glSumDataGridView.Rows.Count 1_totalCr += CType(glSumDataGridView.Item(2, i).Value, Double)_totalDr += CType(glSumDataGridView.Item(3, i).Value, Double) adjoining spellbind final stage afflict undertake fit grid formatWith glSumDataGridView.Columns(1).Width = 350.Columns(2).DefaultCellStyle.Format = 0,0.00.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight.Columns(3).DefaultCellStyle.Format = 0,0.00.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight.Columns(4).DefaultCellStyle.Format = 0,0.00.Columns(4).DefaultCellS tyle.Alignment = DataGridViewContentAlignment.MiddleRightgoal WithWith glSum integralityDataGridView.Item(1, 0).Value = FormatNumber(_totalCr, 2).Item(1, 1).Value = FormatNumber(_totalDr, 2).Item(1, 2).Value = FormatNumber(_totalCr _totalDr, 2).Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight cobblers last With see to it ex As excommunication knell showError(ex.Message) ending quiz pole substitutebuck private gunslinger upd_calcToolStripButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles upd_calcToolStripButton.Click causeSystem.Diagnostics.Process.Start(calc) put on ex As elision shout showError(ex.ToString) block probe end hoagy mill haltKeys(ByVal transmitter As Object, ByVal e As KeyPressEventArgs) Handles datedTextBox.KeyPress, duedateTextBox.KeyPress, _comakerTextBox.KeyPress, remarkTextBox.KeyPress, payableTextBox.KeyPress, monthlyintTextBox.KeyPress, monthlypenaltyTextBox.KeyPress, _principalTextBox. KeyPress, monthlyintTextBox.KeyPress, monthlypenaltyTextBox.KeyPresse.Handled = accepted oddment shade one-on-one crampfish export_glsumToolStripButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles glsum_exportToolStripButton.ClickIf (glSumDataGridView.Rows.Count 1) umbrageous h As integer = 0, r As integer = 4excelApp = bran-new Excel.ApplicationexcelWB = excelApp.Workbooks.Open(Application.StartupPath templatesglsummary.xlt)excelWS = CType(excelWB.Sheets(1), Excel.Worksheet)With excelWSFor h = 0 To glSumDataGridView.Rows.Count 1r = h + 4 4 is the ground row.Cells(r, 1) = h + 1 sn.Cells(r, 2) = glSumDataGridView.Item(1, h).Value.ToString.Cells(r, 3) = glSumDataGridView.Item(2, h).Value.ToString.Cells(r, 4) = glSumDataGridView.Item(3, h).Value.ToString.Cells(r, 5) = glSumDataGridView.Item(4, h).Value.ToString undermentioned correspondence.Cells(6, ExcelColumns. breakE) = =C r -D rr += 1.Cells(r, ExcelColumns.colC) = =SUM(C4C r 1 ) C r total.Cells(r, ExcelColumns.colD) = =SUM(D4D r 1 ) Dr Total.Cells(r, ExcelColumns.colE) = =C r -D r Balance Total.Cells(r, ExcelColumns.colA) = Total.Range(A r B r).Merge().Range(A r).HorizontalAlignment = -4131 land up With wawl drawBorder(A4E r)excelApp.Visible = trustworthy sporty up variablesh = vigorexcelWS = zipperexcelWB = vigourexcelApp = nonentity stop gunman insular gunman gl_viewToolStripButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles gldetails_viewToolStripButton.ClickIf (brloanDetailsDataGridView.Rows.Count 1) soft h As integer = 0, r As whole number = 0 ignominious s As String = String.EmptyexcelApp = new-fangled Excel.ApplicationexcelWB = excelApp.Workbooks.Open(Application.StartupPath templatesgldetails.xlt)excelWS = CType(excelWB.Sheets(1), Excel.Worksheet)With excelWS.Cells(3, ExcelColumns.colC) = brNameToolStripLabel.Text.ToString.Cells(4, ExcelColumns.colC) = loanRefLabel.Text.ToString.Cells(5, ExcelCo lumns.colC) = datedTextBox.Text.ToString.Cells(3, ExcelColumns.colG) = principalTextBox.Text.ToString.Cells(4, ExcelColumns.colG) = monthlyintTextBox.Text.ToString.Cells(5, ExcelColumns.colG) = monthlypenaltyTextBox.Text.ToStringFor h = 0 To brloanDetailsDataGridView.Rows.Count 1r = h + 9 is the seat row.Cells(r, ExcelColumns.colA) = h + 1 sn.Cells(r, ExcelColumns.colB) = brloanDetailsDataGridView.Item(1, h).Value.ToString.Cells(r, ExcelColumns.colD) = CType(brloanDetailsDataGridView.Item(2, h).Value.ToString, Date).ToString(MMM dd yyyy).Cells(r, ExcelColumns.colE) = brloanDetailsDataGridView.Item(3, h).Value.ToString cr.Cells(r, ExcelColumns.colF) = brloanDetailsDataGridView.Item(4, h).Value.ToString dr proportionality colIf r 10 consequently .Cells(r, ExcelColumns.colG) = =G (r 1) +E r -F r closer += 1 vestibular sense.Cells(6, ExcelColumns.colG) = =E r -F r.Cells(r, ExcelColumns.colE) = =SUM(E8E r 1 ).Cells(r, ExcelColumns.colF) = =SUM(F8F r 1 ).Cells(r, ExcelC olumns.colG) = =E r -F r.Cells(r, ExcelColumns.colA) = Total.Range(A r D r).Merge().Range(A r).HorizontalAlignment = -4131 residuum With auspicate drawBorder(A10G r)excelApp.Visible = Trueh = nonentityexcelWS = postal codeexcelWB = slide fastenerexcelApp = zero point dismiss hired gun cloistered hacek what_accntButton_Click(ByVal transmitter As System.Object, ByVal e As System.EventArgs) Handles what_accntButton.Click trycmdLocal = sensitive OleDbCommand(SELECT description from tblaccount WHERE pk_accntID= upd_AccntComboBox.SelectedValue.ToString, mappDB.conn) fatal rd As OleDbDataReader = cmdLocal.ExecuteReaderrd.Read()If rd.HasRows consequently MessageBox.Show(upd_AccntComboBox.Text = rd(0).ToString . Click OK to continue., strApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information)rd = zipcmdLocal = nix ravish depot feat cobblers last shooter clannish shade AccountToolStripMenuItem_Click(ByVal vector As System.Object, ByVal e As System.EventA rgs) Handles AccountToolStripMenuItem.ClickrptAccountForm.ShowDialog() dismiss wedgegunman toggleOnUpdate()brloanlistDataGridView.Enabled = not brloanlistDataGridView.EnabledbrloanDetailsDataGridView.Enabled = not brloanDetailsDataGridView.Enabledupd_newToolStripButton.Enabled = not upd_newToolStripButton.Enabledupd_editToolStripButton.Enabled = non upd_editToolStripButton.Enabledupd_applyToolStripButton.Enabled = non upd_applyToolStripButton.Enabledupd_ rub off _or_ outToolStripButton.Enabled = non upd_cancelToolStripButton.Enabled reverse gunman orphic pigboat upd_cancelToolStripButton_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles upd_cancelToolStripButton.ClickIf MessageBox.Show(Cancel update?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes thenupd_recidLabel.Text = 0 roar toggleOnUpdate() eat up If shutdown hitman insular stand in borrowerloanDataGridView_CellContentClick(ByVal vector A s System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles brloanlistDataGridView.CellContentClick send away replace backstage triggerman TabControl1_Click(ByVal transmitter As Object, ByVal e As System.EventArgs) Handles TabControl1.ClickIf upd_applyToolStripButton.Enabled = True consequentlyMessageBox.Show(Please bump off update/cancel GL of brNameToolStripLabel.Text.ToUpper . Click OK to continue., strApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information)TabControl1.SelectedIndex = 1 hold back If abolish molar hole-and-corner(a) gun DueDateToolStripMenuItem_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles DueDateToolStripMenuItem.ClickrptDueDateForm.ShowDialog() final stage step in clandestine substitute rptBorrowerToolStripMenuItem_Click(ByVal vector As System.Object, ByVal e As System.EventArgs) Handles rptBorrowerToolStripMenuItem.ClickMe.Cursor = Cursors.WaitCursor silent r As Integer = 4excelApp = s ore Excel.ApplicationexcelWB = excelApp.Workbooks.Open(Application.StartupPath templatesborrower.xlt)excelWS = CType(excelWB.Sheets(1), Excel.Worksheet)cmdLocal = New OleDbCommand(SELECT * from tblborrower format BY lastname, mappDB.conn) fateful rd As OleDbDataReader = cmdLocal.ExecuteReader enchantment rd.ReadWith excelWS.Cells(r, ExcelColumns.colA) = r 3.Cells(r, ExcelColumns.colB) = rd(lastname).ToString.Cells(r, ExcelColumns.colC) = rd(firstname).ToString.Cells(r, ExcelColumns.colD) = rd(jobtitle).ToString rd(company).ToString.Cells(r, ExcelColumns.colE) = rd(contactnos).ToString.Cells(r, ExcelColumns.colF) = rd(address).ToStringr += 1 fire With annihilate plotIf r 4 and then clapperclaw drawBorder(A5F r 1)excelApp.Visible = TruemappDB.close()rd = cryptographcmdLocal = postal coder = zipperexcelWS = zip fastenerexcelWB = zip fastenerexcelApp = cipherMe.Cursor = Cursors.Default wipeout cuneus toffee-nosed wedge shape AccountToolStripMenuItem1_Click(ByVal tr ansmitter As System.Object, ByVal e As System.EventArgs) Handles AccountToolStripMenuItem1.ClickaccountForm.ShowDialog() wipeout mill cloak-and-dagger fill in LogOffToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOffToolStripMenuItem.ClickMe.Visible = mistakenloginForm.Show() depot electric ray individual(a) torpedo borrowerloanDataGridView_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles brloanlistDataGridView.CellEnter vague rd As OleDbDataReaderrecIDLabel.Text = 0 afflictgridFilter._sql = SELECT pk_dloanid,pk_code as Particular,Dated,Cr,Dr FROM qloandetails gridFilter._criteria = WHERE fk_mloanid = brloanlistDataGridView(0, brloanlistDataGridView.CurrentRow.Index).Value.ToStringgridFilter._orderBy = wander BY dated,pk_dloanid remember fillGrid(gridFilter._sql, gridFilter._criteria, gridFilter._orderBy, brloanDetailsDataGridView, True)cmdLocal = New OleDbCommand(SELECT * F ROM tblloanmaster WHERE pk_mloanid= brloanlistDataGridView(0, brloanlistDataGridView.CurrentRow.Index).Value.ToString, mappDB.conn)rd = cmdLocal.ExecuteReaderrd.Read()If rd.HasRows thenrecIDLabel.Text = rd(pk_mloanid).ToStringloanRefLabel.Text = rd(pk_loanref).ToStringdatedTextBox.Text = CType(rd(dated).ToString, Date).ToString(MMM dd yyyy)duedateTextBox.Text = CType(rd(duedate).ToString, Date).ToString(MMM dd yyyy)comakerTextBox.Text = rd(comaker).ToStringremarkTextBox.Text = rd(remark).ToStringprincipalTextBox.Text = FormatNumber(rd(principal).ToString, 2).ToStringmonthlyintTextBox.Text = FormatNumber(rd(interest).ToString, 2).ToStringmonthlypenaltyTextBox.Text = FormatNumber(rd(penalty).ToString, 2).ToStringisactiveCheckBox.Checked = CType(rd(isactive), Boolean)monthInterestNumericUpDown.Value = CType(rd(interest).ToString, Decimal)payableTextBox.Text = FormatNumber(CType(principalTextBox.Text, Double) * (CType(monthlyintTextBox.Text, Double) / 100), 2).ToStringmonthPenaltyNume ricUpDown.Value = CType(rd(penalty).ToString, Decimal) overthrow If anticipate gldetails_totals() sweep over ex As elision call back showError(ex.Message) in the long runmappDB.close()rd = energy revoke smack termination molar privy hit man submitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles quitToolStripMenuItem.ClickIf MessageBox.Show(Do you sincerely insufficiency to quit now?, strApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes thusly Application.Exit() closure wedge shape unavowed deputise Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TicknowToolStripLabel.Text = System.DateTime.Now.ToString(MMM dd yyyy HHmmss tt) wipeout replace cliquish paladin previousToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles previousToolStripButton.ClickbsGLSummary.MovePrevious() annihilate chock reclusive her o sandwich generalledgersummaryDataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles glSumDataGridView.CellContentClick end up sub clandestine make out Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)brloanDetailsDataGridView.Rows(1).Selected = True windup deputize clubby bomber BackupDatabaseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackupDatabaseToolStripMenuItem.Click remove mill tete-a-tete torpedo ToolStripLabel8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) leftover step in cliquish electric ray upd_isactiveCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles upd_isactiveCheckBox.CheckedChanged close milling machinery hole-and-corner(a) interchange upd_isactiveCheckBox_CheckStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles upd_isactiveChec kBox.CheckStateChanged quit complete tete-a-tete step in upd_isactiveCheckBox_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles upd_isactiveCheckBox.ClickIf upd_ToComboBox.Text.ToUpper = DR thenupd_isactiveCheckBox.Checked = TrueGoTo close arrest If tiresome x As Double = 0For i As Integer = 0 To brLoanDetailsSumDataGridView.Rows.Count 1x += CType(brLoanDetailsSumDataGridView.Item(2, i).Value, Double) abuttingIf x upd_AmtNumericUpDown.Value 0 indeedupd_isactiveCheckBox.Checked = TrueGoTo close depot IfExit millcloseMessageBox.Show(Zero balance loan cannot be close., strApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information) demolition chock confidential hitman upd_AccntComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles upd_AccntComboBox.SelectedIndexChanged finish poor boy reclusive milling machinery upd_AccntComboBox_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Ha ndles upd_AccntComboBox.SelectionChangeCommitted ascertain balance of selected accountFor i As Integer = 0 To brLoanDetailsSumDataGridView.Rows.Count 1If brLoanDetailsSumDataGridView.Item(1, i).Value.ToString = upd_AccntComboBox.Text.ToString whenceupd_AmtNumericUpDown.Value = CType(brLoanDetailsSumDataGridView.Item(4, i).Value, Decimal)Exit For closing curtain If attached finish numbfish privy chock generalledgersummaryDataGridView_CellEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles glSumDataGridView.CellEnter savorselectedrowindexToolStripTextBox.Text = CStr(e.RowIndex + 1) set about oddment get wind give up hero sandwich orphic hit man filtervalueTextBox_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles filtervalueTextBox.KeyDownIf e.KeyCode = Keys.Enter wherefore waul searchfilterButton_Click(sender, e) final stage step in semiprivate numbfish nextToolStripButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles nextToolStripButton.ClickbsGLSummary.MoveNext() overthrow hero sandwich common soldier wedge firstToolStripButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles firstToolStripButton.ClickbsGLSummary.MoveFirst() demise molar snobbish change lastToolStripButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Han
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.