コード例 #1
0
ファイル: frmCCQualifier.cs プロジェクト: SDivyaprabha/CRM1
        void butQual_DoubleClick(object sender, EventArgs e)
        {
            int      iRowid = gridView1.FocusedRowHandle;
            DataView dv     = new DataView(m_tQualifier);

            dv.RowFilter = "RowId = " + iRowid;
            DataTable dt = new DataTable();

            if (dv.ToTable() != null)
            {
                dt = dv.ToTable();
            }

            Collection QualVBC = new Collection();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cRateQualR RAQual = new cRateQualR();

                RAQual.Add_Less_Flag = CommFun.IsNullCheck(dt.Rows[i]["Add_Less_Flag"], CommFun.datatypes.vartypestring).ToString();
                RAQual.Amount        = 0;
                RAQual.Expression    = CommFun.IsNullCheck(dt.Rows[i]["Expression"], CommFun.datatypes.vartypestring).ToString();
                RAQual.RateID        = Convert.ToInt32(CommFun.IsNullCheck(dt.Rows[i]["QualifierId"], CommFun.datatypes.vartypenumeric));
                RAQual.ExpPer        = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["ExpPer"], CommFun.datatypes.vartypenumeric));
                RAQual.NetPer        = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["Net"], CommFun.datatypes.vartypenumeric));
                RAQual.SurPer        = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["SurCharge"], CommFun.datatypes.vartypenumeric));
                RAQual.EDPer         = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["EDCess"], CommFun.datatypes.vartypenumeric));
                RAQual.HEDPer        = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["HEDCess"], CommFun.datatypes.vartypenumeric));
                RAQual.TaxablePer    = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["Taxable"], CommFun.datatypes.vartypenumeric));
                RAQual.TaxableValue  = Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[i]["TaxableValue"], CommFun.datatypes.vartypenumeric));

                QualVBC.Add(RAQual, RAQual.RateID.ToString(), null, null);
            }

            Qualifier.frmQualifier qul = new Qualifier.frmQualifier();
            decimal dAmt    = 0;
            decimal dNAmt   = 0;
            decimal dTaxAmt = 0;
            decimal dVATAmt = 0;

            if (qul.Execute("B", ref dAmt, ref QualVBC, ref dNAmt, true, "", true, ref dTaxAmt, DateTime.Now, ref dVATAmt) == true)
            {
                DataRow[] drow = m_tQualifier.Select("RowId=" + iRowid + "");
                for (int i = 0; i <= drow.Length - 1; i++)
                {
                    m_tQualifier.Rows.Remove(drow[i]);
                }

                foreach (Qualifier.cRateQualR d in QualVBC)
                {
                    DataRow dr = m_tQualifier.NewRow();

                    dr["RowId"]         = iRowid;
                    dr["QualifierId"]   = d.RateID;
                    dr["Expression"]    = d.Expression;
                    dr["ExpPer"]        = d.ExpPer;
                    dr["Net"]           = d.NetPer;
                    dr["Add_Less_Flag"] = d.Add_Less_Flag;
                    dr["SurCharge"]     = d.SurPer;
                    dr["EDCess"]        = d.EDPer;
                    dr["HEDCess"]       = d.HEDPer;
                    dr["Taxable"]       = d.TaxablePer;
                    dr["TaxableValue"]  = d.TaxableValue;

                    m_tQualifier.Rows.Add(dr);
                }
            }
        }
コード例 #2
0
        void txtGross_EditValueChanged(object sender, EventArgs e)
        {
            TextEdit  editor = (TextEdit)sender;
            DataTable dtQ = new DataTable();
            DataTable dtTQ = new DataTable();
            bool      bService = false; int iQualId = 0;

            decimal dGross = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "GrossAmount"), CommFun.datatypes.vartypenumeric));
            decimal dAmt   = dGross - Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidAmount"), CommFun.datatypes.vartypenumeric));

            //decimal dNetAmt = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "NetAmount"), CommFun.datatypes.vartypenumeric)) - Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "HPaidNetAmount"), CommFun.datatypes.vartypenumeric));

            if (Convert.ToDecimal(CommFun.IsNullCheck(editor.EditValue, CommFun.datatypes.vartypenumeric)) > dAmt)
            {
                MessageBox.Show("Invalid Amount");
                editor.EditValue = dAmt;
            }


            cRateQualR RAQual  = new cRateQualR();
            Collection QualVBC = new Collection();

            //dtQualifier.Columns.Add("FlatId", typeof(int));
            //dtQualifier.Columns.Add("PaymentSchId", typeof(int));

            int iReceiptId = Convert.ToInt32(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "ReceiptTypeId"));
            int iOthId     = Convert.ToInt32(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "OtherCostId"));

            DataView dv = new DataView(m_tQdT);

            dv.RowFilter = "FlatId = " + m_iFlatId + " and PaymentSchId = " + m_iPayShId + " and ReceiptTypeId = " + iReceiptId + " and OtherCostId = " + iOthId;
            dtQ          = dv.ToTable();
            if (dtQ.Rows.Count > 0)
            {
                dtTQ = dtQ.GetChanges().Copy();
            }
            else
            {
                dtTQ = dtQ.Clone();
            }

            for (int k = 0; k < dtQ.Rows.Count; k++)
            {
                DataTable dtTDS = new DataTable();
                DataTable dtQ1  = new DataTable();
                bService = Convert.ToBoolean(dtQ.Rows[k]["Service"]);
                iQualId  = Convert.ToInt32(dtQ.Rows[k]["QualifierId"]);

                RAQual = new cRateQualR();

                if (Convert.ToInt32(dtQ.Rows[k]["QualTypeId"]) == 2)
                {
                    if (bService == true)
                    {
                        dtTDS = ReceiptDetailBL.GetSTSettings("G", m_dDate);
                    }
                    else
                    {
                        dtTDS = ReceiptDetailBL.GetSTSettings("F", m_dDate);
                    }
                }
                else
                {
                    dtTDS = ReceiptDetailBL.GetQual(iQualId, m_dDate);
                }

                dtQ1 = ReceiptDetailBL.QualifierSelect(iQualId, "B", m_dDate);

                if (dtTDS.Rows.Count > 0)
                {
                    RAQual.RateID     = iQualId;
                    RAQual.ExpPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["ExpPer"], CommFun.datatypes.vartypenumeric));
                    RAQual.NetPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["Net"], CommFun.datatypes.vartypenumeric));
                    RAQual.SurPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["SurCharge"], CommFun.datatypes.vartypenumeric));
                    RAQual.EDPer      = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["EDCess"], CommFun.datatypes.vartypenumeric));
                    RAQual.HEDPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["HEDCess"], CommFun.datatypes.vartypenumeric));
                    RAQual.HEDValue   = 0;
                    RAQual.TaxablePer = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["Taxable"], CommFun.datatypes.vartypenumeric));
                }
                if (dtQ1.Rows.Count > 0)
                {
                    RAQual.Add_Less_Flag = dtQ1.Rows[0]["Add_Less_Flag"].ToString();
                    RAQual.Amount        = 0;
                    RAQual.Expression    = dtQ1.Rows[0]["Expression"].ToString();
                }

                //if (dtQ.Rows.Count > 0)
                //{

                //    RAQual.Add_Less_Flag = dtQ.Rows[0]["Add_Less_Flag"].ToString();
                //    RAQual.Amount = 0;
                //    RAQual.Expression = dtQ.Rows[0]["Expression"].ToString();
                //    RAQual.RateID = Convert.ToInt32(dtQ.Rows[0]["QualifierId"].ToString());
                //    RAQual.ExpPer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["ExpPer"], CommFun.datatypes.vartypenumeric));
                //    RAQual.NetPer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["NetPer"], CommFun.datatypes.vartypenumeric));
                //    RAQual.SurPer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["SurCharge"], CommFun.datatypes.vartypenumeric));
                //    RAQual.EDPer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["EDCess"], CommFun.datatypes.vartypenumeric));
                //    RAQual.HEDPer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["HEDPer"], CommFun.datatypes.vartypenumeric));
                //    RAQual.HEDValue = 0;
                //    RAQual.TaxablePer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[0]["TaxablePer"], CommFun.datatypes.vartypenumeric));
                //}

                QualVBC.Add(RAQual, RAQual.RateID.ToString(), null, null);
            }

            Qualifier.frmQualifier qul = new Qualifier.frmQualifier();

            decimal dQNetAmt = 0;
            decimal dTaxAmt  = 0;

            decimal dQBaseAmt = Convert.ToDecimal(CommFun.IsNullCheck(editor.EditValue, CommFun.datatypes.vartypenumeric));

            DataRow dr1;
            decimal dTax    = 0;
            decimal dVATAmt = 0;

            if (qul.Execute("B", ref dQBaseAmt, ref QualVBC, ref dQNetAmt, false, "", true, ref dTaxAmt, m_dDate, ref dVATAmt) == true)
            {
                int     i = 0;
                DataRow dr;
                while (i < m_tQdT.Rows.Count)
                {
                    dr = m_tQdT.Rows[i];
                    if (Convert.ToInt32(dr["FlatId"]) == m_iFlatId && Convert.ToInt32(dr["PaymentSchId"]) == m_iPayShId && Convert.ToInt32(dr["ReceiptTypeId"]) == iReceiptId && Convert.ToInt32(dr["OtherCostId"]) == iOthId)
                    {
                        m_tQdT.Rows.Remove(dr);
                    }
                    else
                    {
                        i++;
                    }
                }


                foreach (Qualifier.cRateQualR d in QualVBC)
                {
                    dr1 = m_tQdT.NewRow();

                    dr1["FlatId"]       = m_iFlatId;
                    dr1["PaymentSchId"] = m_iPayShId;
                    dr1["QualifierId"]  = d.RateID;

                    DataView dv1 = new DataView(dtTQ);
                    dv1.RowFilter = "QualifierId=" + d.RateID + "";

                    dr1["QualTypeId"] = dv1.ToTable().Rows[0]["QualTypeId"];
                    dr1["Service"]    = dv1.ToTable().Rows[0]["Service"];

                    dr1["Expression"]    = d.Expression;
                    dr1["ExpPer"]        = d.ExpPer;
                    dr1["NetPer"]        = d.NetPer; dTax = d.NetPer;
                    dr1["Add_Less_Flag"] = d.Add_Less_Flag;
                    dr1["SurCharge"]     = d.SurPer;
                    dr1["EDCess"]        = d.EDPer;
                    dr1["HEDPer"]        = d.HEDPer;
                    dr1["ExpValue"]      = d.ExpValue;
                    dr1["ExpPerValue"]   = d.ExpPerValue;
                    dr1["SurValue"]      = d.SurValue;
                    dr1["EDValue"]       = d.EDValue;
                    dr1["Amount"]        = d.Amount;
                    dr1["ReceiptTypeId"] = iReceiptId;
                    dr1["OtherCostId"]   = iOthId;
                    dr1["TaxablePer"]    = d.TaxablePer;
                    dr1["TaxableValue"]  = d.TaxableValue;

                    m_tQdT.Rows.Add(dr1);
                }
            }


            grdViewReceipt.SetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidTaxAmount", dTaxAmt);
            grdViewReceipt.SetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidNetAmount", dQNetAmt);
        }
コード例 #3
0
        void txtTax_DoubleClick(object sender, EventArgs e)
        {
            int iReceiptId = Convert.ToInt32(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "ReceiptTypeId"));
            int iOthId     = Convert.ToInt32(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "OtherCostId"));

            DataView dv = new DataView(m_tQdT);

            dv.RowFilter = "FlatId = " + m_iFlatId + " And PaymentSchId = " + m_iPayShId + " And ReceiptTypeId = " + iReceiptId + " And OtherCostId = " + iOthId;
            DataTable dtQ = new DataTable();

            dtQ = dv.ToTable();

            DataTable dtTQ = new DataTable();

            if (dtQ.Rows.Count > 0)
            {
                dtTQ = dtQ.GetChanges().Copy();
            }
            else
            {
                dtTQ = dtQ.Clone();
            }

            Collection QualVBC = new Collection();

            if (dtQ.Rows.Count > 0)
            {
                for (int i = 0; i <= dtQ.Rows.Count - 1; i++)
                {
                    cRateQualR RAQual = new cRateQualR();
                    RAQual.RateID     = Convert.ToInt32(CommFun.IsNullCheck(dtQ.Rows[i]["QualifierId"], CommFun.datatypes.vartypenumeric));
                    RAQual.ExpPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["ExpPer"], CommFun.datatypes.vartypenumeric));
                    RAQual.NetPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["NetPer"], CommFun.datatypes.vartypenumeric));
                    RAQual.SurPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["SurCharge"], CommFun.datatypes.vartypenumeric));
                    RAQual.EDPer      = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["EDCess"], CommFun.datatypes.vartypenumeric));
                    RAQual.HEDPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["HEDPer"], CommFun.datatypes.vartypenumeric));
                    RAQual.TaxablePer = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["TaxablePer"], CommFun.datatypes.vartypenumeric));

                    RAQual.Add_Less_Flag = dtQ.Rows[i]["Add_Less_Flag"].ToString();
                    RAQual.Amount        = Convert.ToDecimal(CommFun.IsNullCheck(dtQ.Rows[i]["Amount"], CommFun.datatypes.vartypenumeric));
                    RAQual.Expression    = dtQ.Rows[i]["Expression"].ToString();

                    QualVBC.Add(RAQual, RAQual.RateID.ToString(), null, null);
                }
            }
            else
            {
                for (int k = 0; k < dtQ.Rows.Count; k++)
                {
                    bool bService = Convert.ToBoolean(CommFun.IsNullCheck(dtQ.Rows[k]["Service"], CommFun.datatypes.varTypeBoolean));
                    int  iQualId  = Convert.ToInt32(CommFun.IsNullCheck(dtQ.Rows[k]["QualifierId"], CommFun.datatypes.vartypenumeric));

                    DataTable dtTDS = new DataTable();
                    if (Convert.ToInt32(CommFun.IsNullCheck(dtQ.Rows[k]["QualTypeId"], CommFun.datatypes.vartypenumeric)) == 2)
                    {
                        if (bService == true)
                        {
                            dtTDS = ReceiptDetailBL.GetSTSettings("G", m_dDate);
                        }
                        else
                        {
                            dtTDS = ReceiptDetailBL.GetSTSettings("F", m_dDate);
                        }
                    }
                    else
                    {
                        dtTDS = ReceiptDetailBL.GetQual(iQualId, m_dDate);
                    }

                    cRateQualR RAQual = new cRateQualR();
                    if (dtTDS.Rows.Count > 0)
                    {
                        RAQual.RateID     = iQualId;
                        RAQual.ExpPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["ExpPer"], CommFun.datatypes.vartypenumeric));
                        RAQual.NetPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["Net"], CommFun.datatypes.vartypenumeric));
                        RAQual.SurPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["SurCharge"], CommFun.datatypes.vartypenumeric));
                        RAQual.EDPer      = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["EDCess"], CommFun.datatypes.vartypenumeric));
                        RAQual.HEDPer     = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["HEDCess"], CommFun.datatypes.vartypenumeric));
                        RAQual.TaxablePer = Convert.ToDecimal(CommFun.IsNullCheck(dtTDS.Rows[0]["Taxable"], CommFun.datatypes.vartypenumeric));
                    }

                    DataTable dtQ1 = new DataTable();
                    dtQ1 = CRM.DataLayer.PaymentScheduleDL.GetQual(Convert.ToInt32(iQualId), m_dDate, "B");
                    //dtQ1 = ReceiptDetailBL.QualifierSelect(iQualId, "B", m_dDate);
                    if (dtQ1.Rows.Count > 0)
                    {
                        RAQual.Add_Less_Flag = dtQ1.Rows[0]["Add_Less_Flag"].ToString();
                        RAQual.Amount        = 0;
                        RAQual.Expression    = dtQ1.Rows[0]["Expression"].ToString();
                    }

                    QualVBC.Add(RAQual, RAQual.RateID.ToString(), null, null);
                }
            }

            decimal dQNetAmt  = 0;
            decimal dTaxAmt   = 0;
            decimal dVATAmt   = 0;
            decimal dQBaseAmt = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidGrossAmount"), CommFun.datatypes.vartypenumeric));

            Qualifier.frmQualifier qul = new Qualifier.frmQualifier();
            if (qul.Execute("B", ref dQBaseAmt, ref QualVBC, ref dQNetAmt, true, "", true, ref dTaxAmt, m_dDate, ref dVATAmt) == true)
            {
                int i = 0;
                while (i < m_tQdT.Rows.Count)
                {
                    DataRow dr = m_tQdT.Rows[i];
                    if (Convert.ToInt32(dr["FlatId"]) == m_iFlatId && Convert.ToInt32(dr["PaymentSchId"]) == m_iPayShId && Convert.ToInt32(dr["ReceiptTypeId"]) == iReceiptId && Convert.ToInt32(dr["OtherCostId"]) == iOthId)
                    {
                        m_tQdT.Rows.Remove(dr);
                    }
                    else
                    {
                        i++;
                    }
                }


                foreach (Qualifier.cRateQualR d in QualVBC)
                {
                    DataRow dr1 = m_tQdT.NewRow();

                    dr1["FlatId"]       = m_iFlatId;
                    dr1["PaymentSchId"] = m_iPayShId;
                    dr1["QualifierId"]  = d.RateID;

                    DataView dv1 = new DataView(dtTQ);
                    dv1.RowFilter = "QualifierId=" + d.RateID + "";

                    if (dv1.ToTable().Rows.Count > 0)
                    {
                        dr1["QualTypeId"] = dv1.ToTable().Rows[0]["QualTypeId"];
                        dr1["Service"]    = dv1.ToTable().Rows[0]["Service"];
                    }

                    dr1["Expression"]    = d.Expression;
                    dr1["ExpPer"]        = d.ExpPer;
                    dr1["NetPer"]        = d.NetPer;
                    dr1["Add_Less_Flag"] = d.Add_Less_Flag;
                    dr1["SurCharge"]     = d.SurPer;
                    dr1["EDCess"]        = d.EDPer;
                    dr1["HEDPer"]        = d.HEDPer;
                    dr1["ExpValue"]      = d.ExpValue;
                    dr1["ExpPerValue"]   = d.ExpPerValue;
                    dr1["SurValue"]      = d.SurValue;
                    dr1["EDValue"]       = d.EDValue;
                    dr1["Amount"]        = d.Amount;
                    dr1["ReceiptTypeId"] = iReceiptId;
                    dr1["OtherCostId"]   = iOthId;
                    dr1["TaxablePer"]    = d.TaxablePer;
                    dr1["TaxableValue"]  = d.TaxableValue;

                    m_tQdT.Rows.Add(dr1);
                }

                grdViewReceipt.SetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidTaxAmount", dTaxAmt);
                grdViewReceipt.SetRowCellValue(grdViewReceipt.FocusedRowHandle, "PaidNetAmount", dQNetAmt);
            }
        }
コード例 #4
0
        public void FillData()
        {
            try
            {
                m_dtComp = new DataTable();
                m_dtComp = ServiceOrderBillBL.Fill_SerOrderRegister(m_iRegBillId);
                if (m_dtComp.Rows.Count > 0)
                {
                    dtpRefDate.EditValue         = Convert.ToDateTime(m_dtComp.Rows[0]["Billdate"].ToString());
                    m_dOldDate                   = Convert.ToDateTime(dtpRefDate.EditValue);
                    txtRefNo.Text                = m_dtComp.Rows[0]["BillRefNo"].ToString();
                    txtRefNo.Properties.ReadOnly = true;
                    cboProject.EditValue         = Convert.ToInt32(m_dtComp.Rows[0]["CostcentreID"].ToString());
                    cboQuote.EditValue           = Convert.ToInt32(m_dtComp.Rows[0]["QuoteRegId"].ToString());
                    cboProject.Enabled           = false;
                    cboQuote.Enabled             = false;

                    m_dtGrid = new DataTable();
                    m_dtGrid = ServiceOrderBillBL.Fill_SerOrderTrans(m_iRegBillId);
                    AddNewEntry();
                    DataRow dr;
                    for (int st = 0; st < m_dtGrid.Rows.Count; st++)
                    {
                        dr = m_dtComPList.NewRow();
                        dr["ServiceId"]   = Convert.ToInt32(m_dtGrid.Rows[st]["ServiceId"].ToString());
                        dr["Description"] = m_dtGrid.Rows[st]["Description"];
                        dr["Amount"]      = m_dtGrid.Rows[st]["Amount"];;
                        m_dtComPList.Rows.Add(dr);
                    }
                    txtTotal.Text     = m_dtComp.Rows[0]["GrossAmt"].ToString();
                    txtQTotal.Text    = m_dtComp.Rows[0]["QualifierAmt"].ToString();
                    txtNAmt.Text      = m_dtComp.Rows[0]["NetAmt"].ToString();
                    txtNarration.Text = m_dtComp.Rows[0]["Narration"].ToString();
                    if (m_dtComp.Rows[0]["Approve"].ToString() == "Y")
                    {
                        barButtonItemOk.Enabled = false;
                    }

                    DataTable dt = new DataTable();
                    dt = ServiceOrderBillBL.Fill_SerOrderTransQu(m_iRegBillId);
                    if (dt.Rows.Count > 0)
                    {
                        QualTrans.Rows.Clear();
                        for (int q = 0; q < dt.Rows.Count; q++)
                        {
                            dr = QualTrans.NewRow();

                            dr["BillRegId"]     = m_iRegBillId;
                            dr["QualifierId"]   = Convert.ToInt32(dt.Rows[q]["QualifierId"].ToString());
                            dr["Expression"]    = dt.Rows[q]["Expression"].ToString();
                            dr["ExpPer"]        = Convert.ToDecimal(dt.Rows[q]["ExpPer"].ToString());
                            dr["Add_Less_Flag"] = dt.Rows[q]["Add_Less_Flag"].ToString();;
                            dr["SurCharge"]     = Convert.ToDecimal(dt.Rows[q]["SurCharge"].ToString());
                            dr["EDCess"]        = Convert.ToDecimal(dt.Rows[q]["EDCess"].ToString());
                            dr["ExpValue"]      = Convert.ToDecimal(dt.Rows[q]["ExpValue"].ToString());
                            dr["ExpPerValue"]   = dt.Rows[q]["ExpPerValue"].ToString();
                            dr["EDValue"]       = dt.Rows[q]["EDValue"].ToString();
                            dr["SurValue"]      = dt.Rows[q]["SurValue"].ToString();
                            dr["Amount"]        = Convert.ToDecimal(dt.Rows[q]["Amount"].ToString());


                            QualTrans.Rows.Add(dr);
                        }
                    }

                    cRateQualR RAQual;

                    for (int i = 0; i < QualTrans.Rows.Count; i++)
                    {
                        RAQual = new cRateQualR();

                        RAQual.Add_Less_Flag = QualTrans.Rows[i]["Add_Less_Flag"].ToString();
                        RAQual.Amount        = Convert.ToDecimal(QualTrans.Rows[i]["Amount"].ToString());
                        RAQual.Expression    = QualTrans.Rows[i]["Expression"].ToString();
                        RAQual.RateID        = Convert.ToInt32(QualTrans.Rows[i]["QualifierId"]);
                        RAQual.ExpPer        = Convert.ToDecimal(QualTrans.Rows[i]["ExpPer"].ToString());
                        RAQual.SurPer        = Convert.ToDecimal(QualTrans.Rows[i]["SurCharge"].ToString());
                        RAQual.EDPer         = Convert.ToDecimal(QualTrans.Rows[i]["EDCess"].ToString());
                        RAQual.ExpPerValue   = Convert.ToDecimal(QualTrans.Rows[i]["ExpPerValue"].ToString());
                        RAQual.ExpValue      = Convert.ToDecimal(QualTrans.Rows[i]["ExpValue"].ToString());
                        RAQual.SurValue      = Convert.ToDecimal(QualTrans.Rows[i]["SurValue"].ToString());
                        RAQual.EDValue       = Convert.ToDecimal(QualTrans.Rows[i]["EDValue"].ToString());

                        QualVBC.Add(RAQual, RAQual.RateID.ToString(), null, null);
                    }
                }
            }
            catch (Exception ex)
            {
                BsfGlobal.CustomException(ex.Message, ex.StackTrace);
            }
        }