Ejemplo n.º 1
0
        public void FilldgvAccountLedger()
        {
            DataTable dtbl     = new DataTable();
            CommonSP  spcommon = new CommonSP();

            dtbl = spcommon.FilldgvAccountLedger();
            dgvAccountLedger.DataSource = dtbl;
        }
Ejemplo n.º 2
0
        public void FilldgvLedgerPopup()
        {
            CommonSP  spCommon = new CommonSP();
            DataTable dt       = new DataTable();

            dt = spCommon.FilldgvLedgerPopup();
            dgvLedgerPopup.DataSource = dt;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Functoion to fill the dgvJournalType
        /// </summary>
        public void FilldgvJournalType()
        {
            CommonSP  spCommon = new CommonSP();
            DataTable dt       = new DataTable();

            dt = spCommon.FilldgvJournalType();
            dgvJournalType.DataSource = dt;
        }
Ejemplo n.º 4
0
        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();
            }
        }
Ejemplo n.º 5
0
        /// <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;
            }
        }
Ejemplo n.º 6
0
        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";
        }
Ejemplo n.º 7
0
        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";
        }
Ejemplo n.º 8
0
        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";
        }
Ejemplo n.º 9
0
        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";
        }
Ejemplo n.º 10
0
        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";
        }
Ejemplo n.º 11
0
        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";
        }
Ejemplo n.º 12
0
        /// <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);
            }
        }
Ejemplo n.º 13
0
        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;
        }