public static bool SaveCaseAccountMaster(ATTCaseAccountMaster attCAM)
        {
            GetConnection     GetConn = new GetConnection();
            OracleTransaction Tran    = GetConn.GetDbConn(Module.CMS).BeginTransaction();

            string InsertUpdateSQL = "SP_ADD_CASE_ACCOUNT_MASTER";

            try
            {
                List <OracleParameter> paramArray = new List <OracleParameter>();
                paramArray.Add(Utilities.GetOraParam(":P_CASE_ID", attCAM.CaseID, OracleDbType.Double, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_TRAN_DATE", attCAM.TransactionDate, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_TRAN_SEQ", attCAM.TransactionSequence, OracleDbType.Int64, ParameterDirection.InputOutput));
                if (attCAM.LitigantID == 0)
                {
                    paramArray.Add(Utilities.GetOraParam(":P_LITIGANT_ID", null, OracleDbType.Double, ParameterDirection.Input));
                }
                else
                {
                    paramArray.Add(Utilities.GetOraParam(":P_LITIGANT_ID", attCAM.LitigantID, OracleDbType.Double, ParameterDirection.Input));
                }
                if (attCAM.AttorneyID == 0)
                {
                    paramArray.Add(Utilities.GetOraParam(":P_ATTORNEY_ID", null, OracleDbType.Double, ParameterDirection.Input));
                }
                else
                {
                    paramArray.Add(Utilities.GetOraParam(":P_ATTORNEY_ID", attCAM.AttorneyID, OracleDbType.Double, ParameterDirection.Input));
                }
                paramArray.Add(Utilities.GetOraParam(":P_REMARKS", attCAM.Remarks, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_ENTRY_BY", attCAM.EntryBy, OracleDbType.Varchar2, ParameterDirection.Input));
                paramArray.Add(Utilities.GetOraParam(":P_OLD_TRAN_DATE", null, OracleDbType.Varchar2, ParameterDirection.Input));

                SqlHelper.ExecuteNonQuery(Tran, CommandType.StoredProcedure, InsertUpdateSQL, paramArray.ToArray());

                DLLCaseAccountDetails.SaveCaseAccountDetail(attCAM.LstAccountDetails, Tran);
                DLLCaseAccountForward.SaveCaseAccountForward(attCAM.LstAccountForward, Tran, attCAM.CaseID);
                Tran.Commit();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static bool RegisterCase(ATTCaseRegistration objCaseRegistration)
        {
            string SP = "";

            if (objCaseRegistration.Action == "A")
            {
                SP = "sp_add_case";
            }
            else if (objCaseRegistration.Action == "E")
            {
                SP = "sp_edit_case";
            }
            else if (objCaseRegistration.Action == "D")
            {
                SP = "sp_del_case";
            }

            List <OracleParameter> paramArray = new List <OracleParameter>();

            paramArray.Add(Utilities.GetOraParam("P_CASE_ID", objCaseRegistration.CaseID, OracleDbType.Double, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("P_COURT_ID", objCaseRegistration.CourtID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_CASE_TYPE_ID", objCaseRegistration.CaseTypeID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_REG_TYPE_ID", objCaseRegistration.RegTypeID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_REG_DIARY_ID", objCaseRegistration.RegDiaryID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_REG_SUBJECT_ID", objCaseRegistration.RegSubjectID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_REG_DIARY_NAME_ID", objCaseRegistration.RegDiaryNameID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_CASE_REG_DATE", objCaseRegistration.CaseRegistrationDate, OracleDbType.Varchar2, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("P_REG_NO", objCaseRegistration.RegistrationNumber, OracleDbType.Varchar2, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("P_CASE_NO", objCaseRegistration.CaseNumber, OracleDbType.Varchar2, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("P_WRIT_SUB_ID", objCaseRegistration.WritSubjectID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_WRIT_CAT_ID", objCaseRegistration.WritCatID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_WRIT_CAT_TITLE_ID", objCaseRegistration.WirtCatTitleID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_WRIT_CAT_SUBTITLE_ID", objCaseRegistration.WritCatSubTitleID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_ACCOUNT_FORWARDED", objCaseRegistration.AccountForwarded, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_VERIFIED_BY", objCaseRegistration.VerifiedBy, OracleDbType.Double, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_VERIFIED_YES_NO", objCaseRegistration.VerifiedYesNo, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_VERIFIED_DATE", objCaseRegistration.VerifiedDate, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_DARPITH_REMARKS", objCaseRegistration.DarpithRemarks, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_PROCEEDING_ID", objCaseRegistration.ProceedingID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_CASE_SUMMARY", objCaseRegistration.CaseSummary, OracleDbType.Varchar2, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_RELATED_CASE_ID", objCaseRegistration.RelatedCaseID, OracleDbType.Int16, ParameterDirection.Input));
            paramArray.Add(Utilities.GetOraParam("P_FY", objCaseRegistration.FY, OracleDbType.Varchar2, ParameterDirection.Input));

            paramArray.Add(Utilities.GetOraParam("CASE_NUMBER", null, OracleDbType.Varchar2, ParameterDirection.InputOutput));
            paramArray.Add(Utilities.GetOraParam("REG_NUMBER", null, OracleDbType.Varchar2, ParameterDirection.InputOutput));
            paramArray[8].Size  = 100;
            paramArray[9].Size  = 100;
            paramArray[23].Size = 100;
            paramArray[24].Size = 100;


            GetConnection     GetConn = new GetConnection();
            OracleTransaction Tran    = GetConn.GetDbConn(Module.CMS).BeginTransaction();


            try
            {
                SqlHelper.ExecuteNonQuery(Tran, CommandType.StoredProcedure, SP, paramArray.ToArray());

                objCaseRegistration.CaseID             = double.Parse(paramArray[0].Value.ToString());
                objCaseRegistration.CaseNumber         = paramArray[22].Value.ToString();
                objCaseRegistration.RegistrationNumber = paramArray[23].Value.ToString();

                if (objCaseRegistration.AppellantLST.Count > 0)
                {
                    DLLLitigants.AddEditLitigants(objCaseRegistration.AppellantLST, Tran, objCaseRegistration.CaseID);
                }

                if (objCaseRegistration.RespondantLST.Count > 0)
                {
                    DLLLitigants.AddEditLitigants(objCaseRegistration.RespondantLST, Tran, objCaseRegistration.CaseID);
                }

                if (objCaseRegistration.CaseCheckListLST.Count > 0)
                {
                    DLLCaseCheckList.AddEditCaseCheckList(objCaseRegistration.CaseCheckListLST, Tran, objCaseRegistration.CaseID);
                }

                if (objCaseRegistration.CaseAccountForwardLST.Count > 0)
                {
                    DLLCaseAccountForward.SaveCaseAccountForward(objCaseRegistration.CaseAccountForwardLST, Tran, objCaseRegistration.CaseID);
                }


                Tran.Commit();
                return(true);
            }
            catch (Exception ex)
            {
                Tran.Rollback();
                throw ex;
            }
            finally
            {
                GetConn.CloseDbConn();
            }
        }