public TradingTransactionSummaryDTO_OS GetTransactionSummary(string sConnectionString, Int64 m_iTransactionMasterId, Int64 m_iPreclearanceId)
 {
     try
     {
         using (var objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL_OS())
         {
             return(objTradingTransactionDAL.GetTransactionSummary(sConnectionString, m_iTransactionMasterId, m_iPreclearanceId));
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
 /// <summary>
 /// This method is used for the Get mst_company details.
 /// </summary>
 /// <returns></returns>
 public InsiderTradingDAL.TradingTransactionMasterDTO_OS Get_mst_company_details(string i_sConnectionString)
 {
     try
     {
         using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
         {
             return(objTradingTransactionDAL_OS.Get_mst_company_details(i_sConnectionString));
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_nUserInfoId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public List <TradingTransactionMasterDTO_OS> Get_PanNumber_OS(TradingTransactionMasterDTO_OS objTradingTransactionMasterDTO, string i_sConnectionString)
        {
            List <TradingTransactionMasterDTO_OS> lstPanNo_OS = new List <TradingTransactionMasterDTO_OS>();

            try
            {
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    lstPanNo_OS = objTradingTransactionDAL_OS.GetPanNumber_OS(objTradingTransactionMasterDTO, i_sConnectionString).ToList <TradingTransactionMasterDTO_OS>();
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(lstPanNo_OS);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_nUserInfoId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public List <DuplicateTransactionDetailsDTO_OS> CheckIntialDisclosureNoHolding_OS(string i_sConnectionString, int nTradingTransactionMasterId)
        {
            List <DuplicateTransactionDetailsDTO_OS> objDuplicateTransactionsDTO_OS = new List <DuplicateTransactionDetailsDTO_OS>();

            try
            {
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    objDuplicateTransactionsDTO_OS = objTradingTransactionDAL_OS.CheckIntialDisclosureNoHolding_OS(i_sConnectionString, nTradingTransactionMasterId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(objDuplicateTransactionsDTO_OS);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_nUserInfoId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public List <DuplicateTransactionDetailsDTO_OS> CheckDuplicateTransaction_OS(string i_sConnectionString, int nLoggedInUserId, int nDMATDetailsID, int nSecurityType, int CompanyId, long nTransactionDetailsId)
        {
            List <DuplicateTransactionDetailsDTO_OS> objDuplicateTransactionsDTO_OS = new List <DuplicateTransactionDetailsDTO_OS>();

            try
            {
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    objDuplicateTransactionsDTO_OS = objTradingTransactionDAL_OS.CheckDuplicateTransaction_OS(i_sConnectionString, nLoggedInUserId, nDMATDetailsID, nSecurityType, CompanyId, nTransactionDetailsId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(objDuplicateTransactionsDTO_OS);
        }
        public InsiderTradingDAL.TradingTransactionMasterDTO_OS GetQuantity(string sConnectionString, int m_iDisclosureTypeCodeId, int m_iUserInfoId)
        {
            InsiderTradingDAL.TradingTransactionMasterDTO_OS res = null;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    res = objTradingTransactionDAL_OS.GetQunatityValue(sConnectionString, m_iDisclosureTypeCodeId, m_iUserInfoId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_nUserInfoId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public InsiderTradingDAL.TradingTransactionMasterDTO_OS GetTradingTransactionMasterDetails(string i_sConnectionString, Int64 m_iTransactionMasterId)
        {
            InsiderTradingDAL.TradingTransactionMasterDTO_OS res = null;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    res = objTradingTransactionDAL_OS.GetTransactionMasterDetails(i_sConnectionString, m_iTransactionMasterId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
        public TradingTransactionDTO_OS GetSellAllDetails(string i_sConnectionString, int transactionmasterId)
        {
            TradingTransactionDTO_OS objTradingTransactionDTO_OS = null;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    objTradingTransactionDTO_OS = objTradingTransactionDAL_OS.GetSellAllDetails(i_sConnectionString, transactionmasterId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(objTradingTransactionDTO_OS);
        }
        public TradingTransactionDTO_OS InsertUpdateSellAllDetails(string i_sConnectionString, TradingTransactionDTO_OS i_objTradingTransactionDTO_OS, int i_nLoggedInUserID)
        {
            TradingTransactionDTO_OS objTradingTransactionDTO_OS = null;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    objTradingTransactionDTO_OS = objTradingTransactionDAL_OS.InsertUpdateSellAllDetails(i_sConnectionString, i_objTradingTransactionDTO_OS, i_nLoggedInUserID);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(objTradingTransactionDTO_OS);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public bool DeleteTradingTransactionMaster(string i_sConnectionString, int m_iTransactionMasterId, int i_nLoggedInUserID)
        {
            bool bReturn = false;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    bReturn = objTradingTransactionDAL.DeleteTradingTransactionMaster(i_sConnectionString, m_iTransactionMasterId, i_nLoggedInUserID);
                }
            }
            catch (Exception exp)
            {
                bReturn = false;
                throw exp;
            }

            return(bReturn);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_nUserInfoId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public InsiderTradingDAL.TradingTransactionMasterDTO_OS GetTradingTransactionMasterCreate(string i_sConnectionString,
                                                                                                  TradingTransactionMasterDTO_OS objTradingTransactionMasterDTO_OS, int i_nLoggedInUserId, out int o_iDisclosureCompletedFlag)
        {
            InsiderTradingDAL.TradingTransactionMasterDTO_OS res = null;

            try
            {
                //InsiderTradingDAL.TradingTransactionDAL objTradingTransactionDAL = new InsiderTradingDAL.TradingTransactionDAL();
                using (var objTradingTransactionDAL_OS = new InsiderTradingDAL.TradingTransactionDAL_OS())
                {
                    res = objTradingTransactionDAL_OS.GetTransactionMasterCreate(i_sConnectionString, objTradingTransactionMasterDTO_OS, i_nLoggedInUserId, out o_iDisclosureCompletedFlag);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }