コード例 #1
0
 /// <summary>
 /// Function to fill the grid based on the Search keys
 /// </summary>
 public void BillAllocationGridFill()
 {
     try
     {
         PartyBalanceSP sppartybalance = new PartyBalanceSP();
         if (cmbAccountGroup.SelectedIndex > -1 && cmbAccountLedger.SelectedIndex > -1)
         {
             if (cmbAccountGroup.SelectedItem.ToString() != "System.Data.DataRowView" || cmbAccountGroup.Text != "System.Data.DataRowView" && cmbAccountLedger.SelectedItem.ToString() != "System.Data.DataRowView" || cmbAccountLedger.Text != "System.Data.DataRowView")
             {
                 if (Convert.ToDateTime(txtfromdate.Text) <= Convert.ToDateTime(txttodate.Text))
                 {
                     dgvBillAllocation.DataSource = sppartybalance.BillAllocationSearch(Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text), cmbAccountGroup.Text, cmbAccountLedger.Text);
                 }
                 else
                 {
                     Messages.InformationMessage("Fromdate should be less than or equal to todate");
                     txttodate.Focus();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("BA:06" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
        public List <DataTable> BillAllocationSearch(DateTime dtfromdate, DateTime dttodate, string straccountgroup, string strledgername)
        {
            List <DataTable> listObj = new List <DataTable>();

            try
            {
                listObj = SPPartyBalance.BillAllocationSearch(dtfromdate, dttodate, straccountgroup, strledgername);
            }
            catch (Exception ex)
            {
                MessageBox.Show("PBBLL:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listObj);
        }