Example #1
0
        public static DataTable GetCaseAccountDetails(ATTCaseAccountDetails attCAD)
        {
            GetConnection    GetConn   = new GetConnection();
            OracleConnection DBConn    = GetConn.GetDbConn(Module.CMS);
            string           SelectSQL = "SP_GET_CASE_ACCOUNT_DETAIL";

            try
            {
                List <OracleParameter> paramArray = new List <OracleParameter>();
                paramArray.Add(Utilities.GetOraParam(":P_CASE_ID", attCAD.CaseID, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_TRAN_DATE", attCAD.TransactionDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_TRAN_SEQ", attCAD.TransactionSequence, OracleDbType.Int64, ParameterDirection.InputOutput));
                paramArray.Add(Utilities.GetOraParam(":P_ACCOUNT_TYPE_ID", attCAD.AccountTypeID, OracleDbType.Int64, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_RC", null, OracleDbType.RefCursor, ParameterDirection.Output));

                DataSet   ds  = SqlHelper.ExecuteDataset(DBConn, CommandType.StoredProcedure, SelectSQL, paramArray.ToArray());
                DataTable tbl = new DataTable();
                tbl = (DataTable)ds.Tables[0];
                return(tbl);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public static List <ATTCaseAccountDetails> GetCaseAccountDetail(ATTCaseAccountDetails attCAD)
        {
            List <ATTCaseAccountDetails> CADList = new List <ATTCaseAccountDetails>();

            try
            {
                foreach (DataRow row in DLLCaseAccountDetails.GetCaseAccountDetails(attCAD).Rows)
                {
                    ATTCaseAccountDetails att = new ATTCaseAccountDetails
                                                (
                        int.Parse(row["CASE_ID"].ToString()),
                        row["TRAN_DATE"].ToString(),
                        int.Parse(row["TRAN_SEQ"].ToString()),
                        int.Parse(row["ACCOUNT_TYPE_ID"].ToString()),
                        int.Parse(row["TOT_AMOUNT"].ToString())
                                                );
                    CADList.Add(att);
                }
                return(CADList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtTranDate_RQD.Text == "")
        {
            lblStatus.Text        = "Saving Error";
            lblStatusMessage.Text = "Enter Trasaction Date first";
            programmaticModalPopup.Show();
            return;
        }

        double caseID = 0;
        //int tranSeq = 0;
        ATTCaseAccountMaster attCM = new ATTCaseAccountMaster();

        foreach (GridViewRow gRow in grdCaseAccount.Rows)
        {
            CheckBox cbSelect = (CheckBox)gRow.Cells[0].FindControl("chkPaid");
            if (cbSelect.Checked == true)
            {
                caseID = double.Parse(gRow.Cells[1].Text);
                //tranSeq = int.Parse(gRow.Cells[2].Text);

                ATTCaseAccountDetails attCD = new ATTCaseAccountDetails(double.Parse(gRow.Cells[1].Text), txtTranDate_RQD.Text, 0, int.Parse(gRow.Cells[2].Text), double.Parse(gRow.Cells[4].Text));
                attCD.EntryBy = strUser;
                attCM.LstAccountDetails.Add(attCD);

                ATTCaseAccountForward attCAF = new ATTCaseAccountForward(double.Parse(gRow.Cells[1].Text), int.Parse(gRow.Cells[2].Text), double.Parse(gRow.Cells[4].Text), "Y");
                attCAF.EntryBy = strUser;
                attCM.LstAccountForward.Add(attCAF);
            }
        }

        if (grdLitigants.SelectedIndex > -1)
        {
            GridViewRow row = grdLitigants.SelectedRow;
            attCM.CaseID              = double.Parse(row.Cells[0].Text);
            attCM.TransactionDate     = txtTranDate_RQD.Text.Trim();
            attCM.TransactionSequence = 0;
            attCM.LitigantID          = double.Parse(row.Cells[1].Text);
            attCM.AttorneyID          = double.Parse(row.Cells[2].Text);
            attCM.Remarks             = txtRemarks.Text.Trim();
            attCM.EntryBy             = strUser;
        }
        else
        {
            attCM.CaseID              = caseID;
            attCM.TransactionDate     = txtTranDate_RQD.Text.Trim();
            attCM.TransactionSequence = 0;
            attCM.LitigantID          = null;
            attCM.AttorneyID          = null;
            attCM.Remarks             = txtRemarks.Text.Trim();
            attCM.EntryBy             = strUser;
        }
        if (BLLCaseAccountMaster.SaveCaseAccountMaster(attCM))
        {
            LoadUnPiadAmount();
            ClearControls();
        }
    }