public void FilldgvAccountLedger() { DataTable dtbl = new DataTable(); CommonSP spcommon = new CommonSP(); dtbl = spcommon.FilldgvAccountLedger(); dgvAccountLedger.DataSource = dtbl; }
public void FilldgvLedgerPopup() { CommonSP spCommon = new CommonSP(); DataTable dt = new DataTable(); dt = spCommon.FilldgvLedgerPopup(); dgvLedgerPopup.DataSource = dt; }
/// <summary> /// Functoion to fill the dgvJournalType /// </summary> public void FilldgvJournalType() { CommonSP spCommon = new CommonSP(); DataTable dt = new DataTable(); dt = spCommon.FilldgvJournalType(); dgvJournalType.DataSource = dt; }
public void FeeDetailsFill(decimal feeItemId, int inRowIndex) { DataTable dt = new DataTable(); CommonSP spCommon = new CommonSP(); dt = spCommon.FillFeeItemComboOne(feeItemId); if (dt.Rows.Count != 0) { dgvFeeProcessing.Rows[inRowIndex].Cells["dgvtxtTerm"].Value = dt.Rows[0]["term_name"]; dgvFeeProcessing.Rows[inRowIndex].Cells["dgvtxtAmount"].Value = dt.Rows[0]["feeAmount"]; TotalAmountCalculation(); } }
/// <summary> /// Function to filter dgvStudent based on Search Item /// </summary> public void FilterdgvledgerPopup() { CommonSP spCommon = new CommonSP(); dgvLedgerPopup.AutoGenerateColumns = false; DataTable dt = new DataTable(); if (txtAdminNumber.Text != string.Empty) { dt = spCommon.filterDetailsFordgvLedgerPopup(Convert.ToString(txtAdminNumber.Text)); dgvLedgerPopup.DataSource = dt; } }
public void FillComboGroup() { DataTable dtbl = new DataTable(); CommonSP common = new CommonSP(); dtbl = common.FillAccountGroupCombo(); DataRow drow = dtbl.NewRow(); dtbl.Rows.InsertAt(drow, 0); cmbGroup.DataSource = dtbl; cmbGroup.DisplayMember = "accountName"; cmbGroup.ValueMember = "accountId"; }
public void FillFeeItemComboBox() { DataTable dt = new DataTable(); CommonSP spCommon = new CommonSP(); dt = spCommon.FillFeeItemCombo(termId, classId); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); dgvcmbFeeItem.DataSource = dt; dgvcmbFeeItem.ValueMember = "feeItemId"; dgvcmbFeeItem.DisplayMember = "feeTitle"; }
public void FillComboBoxTerm() { DataTable dt = new DataTable(); CommonSP spCommon = new CommonSP(); dt = spCommon.FillTermCombo(); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); cmbTerm.DataSource = dt; cmbTerm.ValueMember = "term_id"; cmbTerm.DisplayMember = "term_name"; }
public void FillComboStudent() { CommonSP stud = new CommonSP(); DataTable dt = new DataTable(); dt = stud.FillStudents(classId); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); dgvcmbstudent.DataSource = dt; dgvcmbstudent.ValueMember = "ledgerId"; dgvcmbstudent.DisplayMember = "ledgerName"; }
public void FillDgvSubjectsCombo() { CommonSP stud = new CommonSP(); DataTable dt = new DataTable(); dt = stud.FillSubjectsCombo(); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); dgvsubject.DataSource = dt; dgvsubject.ValueMember = "subject_id"; dgvsubject.DisplayMember = "subjectName"; }
public void FillClassCombo() { DataTable dt = new DataTable(); CommonSP spCommon = new CommonSP(); dt = spCommon.FillStudentClassCombo(); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); cmbClass.DataSource = dt; cmbClass.ValueMember = "ClassNo"; cmbClass.DisplayMember = "ClassNo"; }
/// <summary> /// dgvAttendance grid cell begin edit for Combo box student fill and remove from the list once it has selected /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgvAttendance_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) { try { if (dgvAttendance.RowCount > 1) { DataTable dtbl = new DataTable(); CommonSP studentSp = new CommonSP(); if (dgvAttendance.CurrentCell.ColumnIndex == dgvAttendance.Columns["dgvcmbstudent"].Index) { dtbl = studentSp.FillStudents(classId); if (dtbl.Rows.Count > 0) { if (dgvAttendance.RowCount > 1) { int inGridRowCount = dgvAttendance.RowCount; for (int inI = 0; inI < inGridRowCount - 1; inI++) { if (inI != e.RowIndex) { int inTableRowcount = dtbl.Rows.Count; for (int inJ = 0; inJ < inTableRowcount; inJ++) { if (dgvAttendance.Rows[inI].Cells["dgvcmbstudent"].Value != null && dgvAttendance.Rows[inI].Cells["dgvcmbstudent"].Value.ToString() != string.Empty) { if (dtbl.Rows[inJ]["ledgerId"].ToString() == dgvAttendance.Rows[inI].Cells["dgvcmbstudent"].Value.ToString()) { dtbl.Rows.RemoveAt(inJ); break; } } } } } } DataGridViewComboBoxCell dgvccStudent = (DataGridViewComboBoxCell)dgvAttendance[dgvAttendance.Columns["dgvcmbstudent"].Index, e.RowIndex]; dgvccStudent.DataSource = dtbl; dgvccStudent.ValueMember = "ledgerId"; dgvccStudent.DisplayMember = "ledgerName"; } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void FillComboClass() { CommonSP stud = new CommonSP(); DataTable dt = new DataTable(); dt = stud.FillStudentClassCombo(); DataRow drow = dt.NewRow(); dt.Rows.InsertAt(drow, 0); cmbClass.DataSource = dt; cmbClass.ValueMember = "ClassNo"; cmbClass.DisplayMember = "ClassNo"; cmbClass.SelectedIndex = -1; }