Exemple #1
0
        /// <summary>
        /// Load method is used to get data of the logged in user, according to the privilages for
        /// displaying the Menu
        /// </summary>
        /// <param name="sUserID"></param>
        /// <param name="sLangName"></param>
        public void Load(string sUserID, string sLangName)
        {
            DataSet   odsGsp  = new DataSet();
            DBUtility oDbUtil = new DBUtility();

            oDbUtil.AddParameters("@UserId", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sUserID);
            oDbUtil.AddParameters("@LanguageName", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sLangName);
            odsGsp = oDbUtil.Execute_StoreProc_DataSet("PRC_COM_GETMENUDATA");
            for (int i = 0; i < odsGsp.Tables[0].Rows.Count; i++)
            {
                Add(Convert.ToInt32(odsGsp.Tables[0].Rows[i][0]), odsGsp.Tables[0].Rows[i][1].ToString(), Convert.ToInt32(odsGsp.Tables[0].Rows[i][2]), odsGsp.Tables[0].Rows[i][3].ToString(), odsGsp.Tables[0].Rows[i][4].ToString(), odsGsp.Tables[0].Rows[i][5].ToString(), odsGsp.Tables[0].Rows[i][6].ToString(), Convert.ToInt32(odsGsp.Tables[0].Rows[i][7]), Convert.ToInt32(odsGsp.Tables[0].Rows[i][8]), odsGsp.Tables[0].Rows[i][9].ToString(), Convert.ToInt32(odsGsp.Tables[0].Rows[i][10]));
            }
        }
Exemple #2
0
        public DataSet GetReceiptByID()
        {
            try
            {
                DBUtility oDBUtility = new DBUtility();

                oDBUtility.AddParameters("@DealSlipFXId", DBUtilDBType.Integer, DBUtilDirection.In, 10, iDealSlipFXId);

                DataSet ds = oDBUtility.Execute_StoreProc_DataSet("USP_GET_DEAL_SLIP_FX_DETAILS_BYID");
                return(ds);
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.GetReceiptByID()" + ex.InnerException.ToString(), FPException.ErrorType.Error);
                }
                else
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.GetReceiptByID()" + ex.InnerException.ToString(), FPException.ErrorType.Error);
                }
            }
        }
Exemple #3
0
        public bool UpdateSerialNo()
        {
            try
            {
                bool _bresult = false;

                objDBUtility = new DBUtility();

                objDBUtility.AddParameters("@SerialNo", DBUtilDBType.Integer, DBUtilDirection.In, 10, iSerialNo);
                _bresult = objDBUtility.Execute_StoreProc("USP_UPDATE_SERIAL_NO");
                return(_bresult);
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.UpdateSerialNo()" + ex.InnerException.ToString(), FPException.ErrorType.Error);
                }
                else
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.UpdateSerialNo()" + ex.Message.ToString(), FPException.ErrorType.Error);
                }
            }
        }
Exemple #4
0
        public int AddDealSlipFXDetails()
        {
            try
            {
                bool _bresult   = false;
                int  DealSlipFX = 0;
                objDBUtility = new DBUtility();

                objDBUtility.AddParameters("@ClientName", DBUtilDBType.Varchar, DBUtilDirection.In, 100, sClientName);
                objDBUtility.AddParameters("@SerialNo", DBUtilDBType.Integer, DBUtilDirection.In, 100, iSerialNo);
                if (dCreatedDate != DateTime.MinValue)
                {
                    objDBUtility.AddParameters("@CreatedDate", DBUtilDBType.DateTime, DBUtilDirection.In, 12, dCreatedDate);
                }
                objDBUtility.AddParameters("@Bought", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bBought);
                objDBUtility.AddParameters("@Sold", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bSold);
                objDBUtility.AddParameters("@Swap", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bSwap);
                objDBUtility.AddParameters("@Tod", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bTod);
                objDBUtility.AddParameters("@Tom", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bTom);
                objDBUtility.AddParameters("@Spot", DBUtilDBType.Boolean, DBUtilDirection.In, 5, bSpot);
                objDBUtility.AddParameters("@Forward", DBUtilDBType.Boolean, DBUtilDirection.In, 7, bForward);
                objDBUtility.AddParameters("@Time", DBUtilDBType.Varchar, DBUtilDirection.In, 20, sTime);
                objDBUtility.AddParameters("@CCYBought", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sCCYBought);
                objDBUtility.AddParameters("@BoughtAmount", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dBoughtAmount);
                objDBUtility.AddParameters("@ExchangeRate", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dExchangeRate);
                objDBUtility.AddParameters("@CCYSold", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sCCYSold);
                objDBUtility.AddParameters("@SoldAmount", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dSoldAmount);
                if (dValueDate != DateTime.MinValue)
                {
                    objDBUtility.AddParameters("@ValueDate", DBUtilDBType.DateTime, DBUtilDirection.In, 14, dValueDate);
                }
                objDBUtility.AddParameters("@ReceiveThrough", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sReceiveThrough);
                objDBUtility.AddParameters("@DeliverTo", DBUtilDBType.Varchar, DBUtilDirection.In, 50, sDeliverTo);
                objDBUtility.AddParameters("@PurposePurchaseSale", DBUtilDBType.Varchar, DBUtilDirection.In, 250, sPurposePurchaseSale);
                objDBUtility.AddParameters("@DepositRate", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dDepositRate);
                objDBUtility.AddParameters("@DepositInterest", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dDepositInterest);
                objDBUtility.AddParameters("@DepositTenor", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dDepositTenor);
                objDBUtility.AddParameters("@DepositMaturity", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dDepositMaturity);
                objDBUtility.AddParameters("@PlacementRate", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dPlacementRate);
                objDBUtility.AddParameters("@PlacementInterest", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dPlacementInterest);
                objDBUtility.AddParameters("@PlacementTenor", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dPlacementTenor);
                objDBUtility.AddParameters("@PlacementMaturity", DBUtilDBType.Decimal, DBUtilDirection.In, 20, dPlacementMaturity);
                objDBUtility.AddParameters("@DealSlipFXId", DBUtilDBType.Integer, DBUtilDirection.Out, 20, iDealSlipFXId);
                objDBUtility.Execute_StoreProc("USP_ADD_DEAL_SLIP_FX_DETAILS");
                DealSlipFX = Convert.ToInt32(objDBUtility.getOutputParameterValue("@DealSlipFXId"));

                return(DealSlipFX);
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.AddDealSlipFXDetails()" + ex.InnerException.ToString(), FPException.ErrorType.Error);
                }
                else
                {
                    throw new FPException("FP.BL.DealSlipFX.DealSlipFXMaster.AddDealSlipFXDetails()" + ex.Message.ToString(), FPException.ErrorType.Error);
                }
            }
        }