public void SaveData(List <CashBackRegBO> cashBackRegBos)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            // cashBackRegBo.SlNo = commonBAL.GenerateID("SBP_CashBack_Reg", "CB_ID");
            queryString = @"SBPSaveCashBackReg";
            try
            {
                _dbConnection.ConnectDatabase();
                foreach (CashBackRegBO cashBackRegBo in cashBackRegBos)
                {
                    _dbConnection.ActiveStoredProcedure();
                    // _dbConnection.AddParameter("@cbID", SqlDbType.Int, cashBackRegBo.SlNo);
                    _dbConnection.AddParameter("@sessionID", SqlDbType.Int, cashBackRegBo.SessionId);
                    _dbConnection.AddParameter("@custCode", SqlDbType.NVarChar, cashBackRegBo.CustCode);
                    _dbConnection.AddParameter("@planID", SqlDbType.Int, cashBackRegBo.PlanId);
                    _dbConnection.AddParameter("@planName", SqlDbType.VarChar, cashBackRegBo.PlanName);
                    _dbConnection.AddParameter("@cashbackamount", SqlDbType.Money, cashBackRegBo.CashBackAmount);
                    _dbConnection.AddParameter("@remark", SqlDbType.VarChar, cashBackRegBo.Remarks);
                    // _dbConnection.AddParameter("@entryDate", SqlDbType.DateTime, cashBackRegBo.EntryDate);
                    _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                    _dbConnection.ExecuteNonQuery(queryString);
                }
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 2
0
        public DataTable GetCustSummery(string custCode, DateTime fromDate, DateTime toDate)
        {
            _dbConnection.TimeoutPeriod = 3000;

            DataTable dtCustSummery = null;
            string    quryString    = "";

            quryString = "SP_TaxCerfificate";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@custCode", SqlDbType.NVarChar, custCode);
                _dbConnection.AddParameter("@dateFrom", SqlDbType.DateTime, fromDate.ToShortDateString());
                _dbConnection.AddParameter("@dateTo", SqlDbType.DateTime, toDate.ToShortDateString());
                dtCustSummery = _dbConnection.ExecuteProQuery(quryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dtCustSummery);
        }
Ejemplo n.º 3
0
        public void SaveOthersHoliday(HolidayBO holydayBo)
        {
            string    queryString = "";
            CommonBAL comBAL      = new CommonBAL();

            // holydayBo.SlNo = comBAL.GenerateID("SBP_Holiday", "Sl_No");
            queryString = @"SBPSaveHoliday";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                //_dbConnection.AddParameter("@SlNo", SqlDbType.Int, holydayBo.SlNo);
                _dbConnection.AddParameter("@HolydayDate", SqlDbType.DateTime, holydayBo.HolydayDate.ToShortDateString());
                _dbConnection.AddParameter("@Purpose", SqlDbType.VarChar, holydayBo.Purpose);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
        public bool Check_All_Hide(int resourceId, int criteriaId)
        {
            bool      result      = false;
            string    queryString = @"GetIsAllHide";
            DataTable data        = new DataTable();

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@ResourceId", SqlDbType.Int, resourceId);
                _dbConnection.AddParameter("@CriteriaId", SqlDbType.Int, criteriaId);
                _dbConnection.AddParameter("@UserName", SqlDbType.VarChar, GlobalVariableBO._userName);
                data = _dbConnection.ExecuteProQuery(queryString);
            }
            catch (Exception)
            {
                throw;
            }

            finally
            {
                _dbConnection.CloseDatabase();
            }
            if (data.Rows.Count > 0)
            {
                if (data.Rows[0][0].ToString() != "0")
                {
                    result = true;
                }
            }
            return(result);
        }
Ejemplo n.º 5
0
        public DataTable GetIPOCustSummeryLedger(string custCode, DateTime fromDate, DateTime toDate)
        {
            DataTable dtShareDWReview = null;
            string    quryString      = "";

            quryString = @"RptIPOGetCustomerSummeryLedger";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@custCode", SqlDbType.NVarChar, custCode);
                _dbConnection.AddParameter("@fromDate", SqlDbType.DateTime, fromDate);
                _dbConnection.AddParameter("@toDate", SqlDbType.DateTime, toDate);
                dtShareDWReview = _dbConnection.ExecuteProQuery(quryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dtShareDWReview);
        }
        public DataTable GetBonusInstrumentConfirmationData(string instrumentID, DateTime fromDate, DateTime toDate, string Investor_ID, string BOID)
        {
            DataTable data = new DataTable();

            try
            {
                string Query = @"rptBonus_Instrument_Confirmation_Report_DSE_21_2";
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Start_Date", SqlDbType.DateTime, fromDate);
                _dbConnection.AddParameter("@End_Date", SqlDbType.DateTime, toDate);
                _dbConnection.AddParameter("@Instrument_ID", SqlDbType.VarChar, instrumentID);
                _dbConnection.AddParameter("@Investor_ID", SqlDbType.VarChar, Investor_ID);
                _dbConnection.AddParameter("@BO_ID", SqlDbType.VarChar, BOID);
                data = _dbConnection.ExecuteProQuery(Query);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                this._dbConnection.CloseDatabase();
            }
            return(data);
        }
        ///////////////////////////////////////////////////////////////////////////////////////////////////

        public DataTable IPO_Money_Trns(String fromDate, string toDate)
        {
            DataTable dtPaymentReview = null;

            string quryString = "";

            quryString = @"Rpt_IPO_Money_Trns_ApplyTogether";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@fromDate", SqlDbType.DateTime, fromDate);
                _dbConnection.AddParameter("@toDate", SqlDbType.DateTime, toDate);

                dtPaymentReview = _dbConnection.ExecuteProQuery(quryString);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dtPaymentReview);
        }
        public void Insert(BranchManagementBO branchMngmntBO)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            branchMngmntBO.BranchId = commonBAL.GenerateID("SBP_Broker_Branch", "Branch_ID");
            queryString             = @"SBPSaveBranch";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@branchID", SqlDbType.Int, branchMngmntBO.BranchId);
                _dbConnection.AddParameter("@branchName", SqlDbType.VarChar, branchMngmntBO.BranchName);
                _dbConnection.AddParameter("@address", SqlDbType.VarChar, branchMngmntBO.BranchAddress);
                _dbConnection.AddParameter("@telePhone", SqlDbType.VarChar, branchMngmntBO.TelePhone);
                _dbConnection.AddParameter("@fax", SqlDbType.VarChar, branchMngmntBO.Fax);
                _dbConnection.AddParameter("@eMail", SqlDbType.VarChar, branchMngmntBO.Email);
                _dbConnection.AddParameter("@web", SqlDbType.VarChar, branchMngmntBO.Web);
                _dbConnection.AddParameter("@openDate", SqlDbType.DateTime, branchMngmntBO.BranchOpeningdate.ToShortDateString());
                _dbConnection.AddParameter("@isActive ", SqlDbType.Int, branchMngmntBO.BranchIsActive);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 9
0
        public DataTable getBoInfo(DateTime FromDate, DateTime ToDate)
        {
            DataTable dt    = null;
            string    query = "";

            query = @"rptBoOpeningInformationForReport";

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@StartDate", SqlDbType.DateTime, FromDate);
                _dbConnection.AddParameter("@EndDate", SqlDbType.DateTime, ToDate);
                dt = _dbConnection.ExecuteProQuery(query);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dt);
        }
        public DataTable GetReport(int CatgId, int FreqId, int BranchID, DateTime FromDate, DateTime ToDate, bool IsExpenseDate)
        {
            DataTable dataTable   = new DataTable();
            string    queryString = @"RptGetExepenseReport";

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@ExpenseCatgType_ID", SqlDbType.Int, CatgId);
                _dbConnection.AddParameter("@ExpenseFrequency", SqlDbType.Int, FreqId);
                _dbConnection.AddParameter("@Branch_ID", SqlDbType.Int, BranchID);
                _dbConnection.AddParameter("@FromDate", SqlDbType.DateTime, FromDate);
                _dbConnection.AddParameter("@ToDate", SqlDbType.DateTime, ToDate);
                _dbConnection.AddParameter("@IsExpenseDate", SqlDbType.Bit, IsExpenseDate);
                dataTable = _dbConnection.ExecuteProQuery(queryString);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }

            return(dataTable);
        }
        public void Insert(UserManagementBO userBO)
        {
            string userQueryString = "";

            userQueryString = @"SBPSaveUserInfo";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@userName", SqlDbType.NVarChar, userBO.UserName);
                _dbConnection.AddParameter("@roleName", SqlDbType.NVarChar, userBO.RoleName);
                _dbConnection.AddParameter("@password", SqlDbType.NVarChar, userBO.Password);
                _dbConnection.AddParameter("@name", SqlDbType.VarChar, userBO.Name);
                _dbConnection.AddParameter("@address", SqlDbType.VarChar, userBO.Address);
                _dbConnection.AddParameter("@contact", SqlDbType.VarChar, userBO.ContactNo);
                _dbConnection.AddParameter("@remark", SqlDbType.VarChar, userBO.Remarks);
                _dbConnection.AddParameter("@isActive", SqlDbType.Bit, userBO.IsActive);
                _dbConnection.AddParameter("@branchID", SqlDbType.Int, userBO.BranchId);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.AddParameter("@employeeCode", SqlDbType.VarChar, userBO.EmployeeCode);
                _dbConnection.ExecuteNonQuery(userQueryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
        public DataTable GetAccruedBalanceData(string custCode, DateTime fromDate, DateTime toDate)
        {
            DataTable dt    = new DataTable();
            string    Query = @"Accrued_Money_Transaction";

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();

                if (!string.IsNullOrEmpty(custCode))
                {
                    _dbConnection.AddParameter("@Cust_Code", SqlDbType.NVarChar, custCode);
                }

                _dbConnection.AddParameter("@StartDate", SqlDbType.DateTime, fromDate);
                _dbConnection.AddParameter("@EndDate", SqlDbType.DateTime, toDate);
                dt = _dbConnection.ExecuteProQuery(Query);
            }
            catch
            {
                throw;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dt);
        }
Ejemplo n.º 13
0
        public void Insert(MarginPlanBO marginPlanBo)
        {
            string queryString = "";

            queryString = @"SBPSaveMarginChargePlan";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@CustCode", SqlDbType.NVarChar, marginPlanBo.CustCode);
                _dbConnection.AddParameter("@PlanName", SqlDbType.VarChar, marginPlanBo.PlanName);
                _dbConnection.AddParameter("@EffectiveCount", SqlDbType.Int, marginPlanBo.EffectiveCount);
                _dbConnection.AddParameter("@ChargeRate", SqlDbType.Float, marginPlanBo.ChargeRate);
                if (marginPlanBo.CommissionRate > 0)
                {
                    _dbConnection.AddParameter("@CommissionRate", SqlDbType.Float, marginPlanBo.CommissionRate);
                }
                _dbConnection.AddParameter("@FreeAmount", SqlDbType.Money, marginPlanBo.FreeAmount);
                _dbConnection.AddParameter("@MarginRatio", SqlDbType.Float, marginPlanBo.MarginRatio);
                _dbConnection.AddParameter("@Remarks", SqlDbType.VarChar, marginPlanBo.Remarks);
                _dbConnection.AddParameter("@EDate", SqlDbType.DateTime, marginPlanBo.EDate.ToShortDateString());
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 14
0
        public DataTable GetCashDividedSatellmentReport(DateTime RecDate, decimal FaceValue, decimal Percentage, string InstrumentCode)
        {
            DataTable dt    = new DataTable();
            string    query = "CashDividedSatellmentReport";

            //string query = "FindCashDividedCustCode";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Rec_Date", SqlDbType.DateTime, RecDate);
                _dbConnection.AddParameter("@FaceValue", SqlDbType.Decimal, FaceValue);
                _dbConnection.AddParameter("@Percentage", SqlDbType.Decimal, Percentage);
                _dbConnection.AddParameter("@InsTrumentCode", SqlDbType.VarChar, InstrumentCode);
                dt = _dbConnection.ExecuteProQuery(query);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }

            return(dt);
        }
Ejemplo n.º 15
0
        public void Insert(CustomerCommisionBO commisionBo)
        {
            CommonBAL commonBAL = new CommonBAL();

            commisionBo.CommID = commonBAL.GenerateID("SBP_Cust_Commissions", "Commission_ID");
            string queryString = "";

            queryString = @"SBPSaveCustCommissionDef";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@CommID", SqlDbType.Int, commisionBo.CommID);
                _dbConnection.AddParameter("@GroupId", SqlDbType.Int, commisionBo.GroupId);
                _dbConnection.AddParameter("@MinComm", SqlDbType.Money, commisionBo.MinComm);
                _dbConnection.AddParameter("@GroupCommRate", SqlDbType.Money, commisionBo.GroupCommRate);
                _dbConnection.AddParameter("@Category", SqlDbType.VarChar, commisionBo.Category);
                _dbConnection.AddParameter("@EffectiveFrom", SqlDbType.DateTime, commisionBo.EffectiveFrom);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 16
0
        public void SaveCommonOpexInfo(OpexDailyBO opexDailyBo)
        {
            string queryString = "SP_CommonExpense";


            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Expense_Purpose_ID", SqlDbType.Int, (object)opexDailyBo.PurposeId);
                _dbConnection.AddParameter("@Purpose", SqlDbType.VarChar, (object)opexDailyBo.Purpose);
                _dbConnection.AddParameter("@Amount", SqlDbType.Money, (object)opexDailyBo.Amount);
                _dbConnection.AddParameter("@Expense_Date", SqlDbType.DateTime, (object)opexDailyBo.ExpenseDate.ToShortDateString());
                _dbConnection.AddParameter("@Expense_Month", SqlDbType.DateTime, (object)opexDailyBo.MonthOfExpense.ToShortDateString());
                _dbConnection.AddParameter("@Remarks", SqlDbType.VarChar, (object)opexDailyBo.Remarks);
                _dbConnection.AddParameter("@Entry_By", SqlDbType.VarChar, (object)GlobalVariableBO._userName);
                _dbConnection.AddParameter("@VoucharNo", SqlDbType.VarChar, (object)opexDailyBo.VoucherNo);
                _dbConnection.AddParameter("@VoucherImage", SqlDbType.Image, (object)opexDailyBo.VoucherImage);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception)
            {
                throw;
            }

            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 17
0
        public DataTable GnerateIPOPaymentReview(DateTime fromDate, DateTime toDate, int isSorted, int Branch_ID)
        {
            DataTable dtPaymentReview = null;
            int       isAccountsView  = 0;
            string    quryString      = "";

            quryString = @"RptIPONewPaymentReviewSorted";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@fromDate", SqlDbType.DateTime, fromDate.ToShortDateString());
                _dbConnection.AddParameter("@toDate", SqlDbType.DateTime, toDate.ToShortDateString());
                _dbConnection.AddParameter("@IsSorted", SqlDbType.Int, isSorted);
                _dbConnection.AddParameter("@IsAccountsView", SqlDbType.Int, isAccountsView);
                _dbConnection.AddParameter("@Branch_ID", SqlDbType.Int, Branch_ID);
                dtPaymentReview = _dbConnection.ExecuteProQuery(quryString);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dtPaymentReview);
        }
Ejemplo n.º 18
0
        public DataTable Get_DW_ReturnInformation(string paymentMedia, string depositWithdraw, string CustCode)
        {
            DataTable dataTable   = new DataTable();
            string    queryString = @"GetReturnTransaction";

//            string queryString = @"SELECT *
//                                FROM [SBP_Database].[dbo].[SBP_Payment_Posting_Request]
//                                WHERE Cust_Code='" + custcode + "' AND Payment_Media='"+paymentMedia + "' AND Deposit_Withdraw='"+depositWithdraw + "' AND Approval_Status=1";

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Payment_Media", SqlDbType.VarChar, paymentMedia);
                _dbConnection.AddParameter("@deposit_withdraw", SqlDbType.VarChar, depositWithdraw);
                _dbConnection.AddParameter("@Cust_Code", SqlDbType.VarChar, CustCode);
                dataTable = _dbConnection.ExecuteProQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dataTable);
        }
Ejemplo n.º 19
0
        public void Insert(IPOChargeDefBO ipoChargeDefBo)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            ipoChargeDefBo.SlNo = commonBAL.GenerateID("SBP_Ch_Def_IPO", "Sl_No");
            queryString         = @"SBPSaveIPOChargeDef";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@SlNo", SqlDbType.Int, ipoChargeDefBo.SlNo);
                _dbConnection.AddParameter("@CompShortCode", SqlDbType.NVarChar, ipoChargeDefBo.CompShortCode);
                _dbConnection.AddParameter("@CompName", SqlDbType.NVarChar, ipoChargeDefBo.CompName);
                _dbConnection.AddParameter("@ShareType", SqlDbType.VarChar, ipoChargeDefBo.ShareType);
                _dbConnection.AddParameter("@Commision", SqlDbType.Money, ipoChargeDefBo.Commision);
                _dbConnection.AddParameter("@EffectiveDate", SqlDbType.DateTime, ipoChargeDefBo.EffectiveDate.ToShortDateString());
                _dbConnection.AddParameter("@remark1", SqlDbType.VarChar, ipoChargeDefBo.Remarks1);
                _dbConnection.AddParameter("@remark2", SqlDbType.VarChar, ipoChargeDefBo.Remarks2);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 20
0
        public DataTable GetNettingSumery(DateTime date)
        {
            string queryString = "SP_FinNetting";

            DataTable data = new DataTable();

            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.TimeoutPeriod = 5000;
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@date", SqlDbType.DateTime, date.ToString("yyyy-MM-dd"));
                data = _dbConnection.ExecuteProQuery(queryString);
            }
            catch (Exception)
            {
                throw;
            }

            finally
            {
                _dbConnection.CloseDatabase();
            }

            return(data);
        }
Ejemplo n.º 21
0
        public DataTable IPOSingleApplicationReport(DateTime FromDate, DateTime ToDate, string Status, string Company, int BranchId)
        {
            DataTable dt    = new DataTable();
            string    query = @"Rpt_IPOSingleApplication_Process";

            try
            {
                _dbconnection.ConnectDatabase();
                _dbconnection.ActiveStoredProcedure();
                _dbconnection.AddParameter("@Session_ID", SqlDbType.Int, Company);
                _dbconnection.AddParameter("@Start_Date", SqlDbType.Date, FromDate.ToShortDateString());
                _dbconnection.AddParameter("@End_Date", SqlDbType.Date, ToDate.ToShortDateString());
                _dbconnection.AddParameter("@Application_Status", SqlDbType.VarChar, Status);
                _dbconnection.AddParameter("@Branch_Id", SqlDbType.Int, BranchId);
                dt = _dbconnection.ExecuteProQuery(query);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                _dbconnection.CloseDatabase();
            }
            return(dt);
        }
Ejemplo n.º 22
0
        public DataTable GetShareInfo(ShareListBO shareBo)
        {
            string    queryString = "";
            DataTable dataTable   = new DataTable();

            queryString = @"RptGetShareInfo";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@fromDate", SqlDbType.DateTime, shareBo.DtFrom.ToShortDateString());
                _dbConnection.AddParameter("@toDate", SqlDbType.DateTime, shareBo.DtTo.ToShortDateString());
                _dbConnection.AddParameter("@userID", SqlDbType.NVarChar, shareBo.WorkStation);
                dataTable = _dbConnection.ExecuteProQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dataTable);
        }
Ejemplo n.º 23
0
        public void InsertPrintLog(CheckPrintLogBO checkPrintLogBo)
        {
            string queryString = "";

            queryString = @"SBPSaveCheckPrintHistory";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@SlNo", SqlDbType.Int, checkPrintLogBo.SlNo);
                _dbConnection.AddParameter("@CustCode", SqlDbType.VarChar, checkPrintLogBo.CustCode);
                _dbConnection.AddParameter("@PaymentMediaNo", SqlDbType.VarChar, checkPrintLogBo.PaymentMediaNo);
                _dbConnection.AddParameter("@BankName", SqlDbType.VarChar, checkPrintLogBo.Bankname);
                _dbConnection.AddParameter("@VoucheNo", SqlDbType.VarChar, checkPrintLogBo.VoucherSlNo);
                _dbConnection.AddParameter("@RecievedDate", SqlDbType.DateTime, checkPrintLogBo.RecievedDate.ToShortDateString());
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 24
0
        public void Insert(ClosingChargeBO closingChargeBo)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            closingChargeBo.ChId = commonBAL.GenerateID("SBP_Account_Closing_Charge", "Ch_ID");

            queryString = @"SBPSaveClosingCharge";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@ChId", SqlDbType.Int, closingChargeBo.ChId);
                _dbConnection.AddParameter("@ClosingChargeRate", SqlDbType.Money, closingChargeBo.ClosingCharge);
                _dbConnection.AddParameter("@EffectiveDate", SqlDbType.DateTime, closingChargeBo.EffectiveDate.ToShortDateString());
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
Ejemplo n.º 25
0
        public void Insert(PaymentMaturityBO paymentMaturityBo)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            paymentMaturityBo.Id = commonBAL.GenerateID("SBP_Payment_Media_Maturity", "ID");

            queryString = @"SBPSavePaymentMediaMaturity";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Id", SqlDbType.Int, paymentMaturityBo.Id);
                _dbConnection.AddParameter("@PaymentMedia", SqlDbType.VarChar, paymentMaturityBo.PaymentMedia);
                _dbConnection.AddParameter("@MaturityDays", SqlDbType.Int, paymentMaturityBo.MaturityDays);
                _dbConnection.AddParameter("@effectiveDate", SqlDbType.DateTime, paymentMaturityBo.EffectiveDate);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
        public void Insert(CompanyCategoryChangeBO changeBo)
        {
            string    compCatChangeQryString = "";
            CommonBAL commonBAL = new CommonBAL();

            changeBo.SlNo = commonBAL.GenerateID("SBP_Comp_Cat_Log", "Sl_No");
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.StartTransaction();
                compCatChangeQryString = @"SBPSaveCompCatChange";
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@SlNo", SqlDbType.Int, changeBo.SlNo);
                _dbConnection.AddParameter("@CompShortCode", SqlDbType.NVarChar, changeBo.CompShortCode);
                _dbConnection.AddParameter("@OldCategoryId", SqlDbType.Int, changeBo.OldCategoryId);
                _dbConnection.AddParameter("@NewCategoryId", SqlDbType.Int, changeBo.NewCategoryId);
                _dbConnection.AddParameter("@EffectiveDate", SqlDbType.DateTime, changeBo.EffectiveDate);
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(compCatChangeQryString);
                _dbConnection.Commit();
            }
            catch (Exception exception)
            {
                _dbConnection.Rollback();
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
        public DataSet GetData(string custCode, DateTime StartDate, DateTime EndDate)
        {
            DataSet PaymentReceiptSummary = null;
            string  queryString           = "";

            queryString = @"RptTaxStatement";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@FromDate", SqlDbType.DateTime, StartDate);
                _dbConnection.AddParameter("@ToDate", SqlDbType.DateTime, EndDate);
                _dbConnection.AddParameter("@Cust_Code", SqlDbType.NVarChar, custCode);
                PaymentReceiptSummary = _dbConnection.ExecuteProQueryDataset(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(PaymentReceiptSummary);
        }
Ejemplo n.º 28
0
        public void Insert(ChargeDefBO chargeDefBo)
        {
            string    queryString = "";
            CommonBAL commonBAL   = new CommonBAL();

            chargeDefBo.ChDefId = commonBAL.GenerateID("SBP_Ch_Def_All", "Ch_ID");

            queryString = @"SBPSaveChargeDef";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@ChDefId", SqlDbType.Int, chargeDefBo.ChDefId);
                _dbConnection.AddParameter("@ChItem", SqlDbType.VarChar, chargeDefBo.ChItem);
                _dbConnection.AddParameter("@ChItemDescription", SqlDbType.VarChar, chargeDefBo.ChItemDescription);
                _dbConnection.AddParameter("@Category", SqlDbType.VarChar, chargeDefBo.Category);
                _dbConnection.AddParameter("@MinCh", SqlDbType.Money, chargeDefBo.MinCh);
                _dbConnection.AddParameter("@ChRate", SqlDbType.Decimal, chargeDefBo.ChRate);
                _dbConnection.AddParameter("@EffectiveDate", SqlDbType.DateTime, chargeDefBo.EffectiveDate.ToShortDateString());
                _dbConnection.AddParameter("@entryBy", SqlDbType.VarChar, GlobalVariableBO._userName);
                _dbConnection.ExecuteNonQuery(queryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
        }
        public DataTable GetStatement(DateTime RporotDate)
        {
            _dbConnection.TimeoutPeriod = 3000;

            DataTable dtStatement = null;
            string    quryString  = "";

            quryString = "SP_TaxCerfificate";
            try
            {
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@dateFrom", SqlDbType.DateTime, RporotDate.ToShortDateString());
                dtStatement = _dbConnection.ExecuteProQuery(quryString);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            finally
            {
                _dbConnection.CloseDatabase();
            }
            return(dtStatement);
        }
        public DataTable GetBO_Modification_ReportData(string CustCode, string BOID, DateTime fromDate, DateTime toDate)
        {
            DataTable data = new DataTable();

            try
            {
                string Query = @"rptBO_Modification_Report_DSE_21_5";
                _dbConnection.ConnectDatabase();
                _dbConnection.ActiveStoredProcedure();
                _dbConnection.AddParameter("@Investor_ID", SqlDbType.VarChar, CustCode);
                _dbConnection.AddParameter("@BO_ID", SqlDbType.VarChar, BOID);
                _dbConnection.AddParameter("@Start_Date", SqlDbType.DateTime, fromDate);
                _dbConnection.AddParameter("@End_Date", SqlDbType.DateTime, toDate);

                data = _dbConnection.ExecuteProQuery(Query);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }
            return(data);
        }