public void checkmaxfee(pfm_SchemeFeeRepo schemeFeeRepo) { try { var con = new AppSettings(); var param = new DynamicParameters(); param.Add("P_FEEID", schemeFeeRepo.Fee_Id, DbType.String, ParameterDirection.Input); param.Add("VDATA", null, DbType.Decimal, ParameterDirection.Output); con.GetConnection().Execute("CHECK_FEE", param, commandType: CommandType.StoredProcedure); schemeFeeRepo.Fee = param.Get <decimal>("VDATA"); } catch (Exception ex) { throw ex; } }
//SAVE FUND MANAGER SCHEME FEE RECORD public void SaveRecordFM(pfm_SchemeFeeRepo schemeFeeRepo) { try { //Get Connection AppSettings app = new AppSettings(); con = app.GetConnection(); DynamicParameters param = new DynamicParameters(); param.Add(name: "P_FUND_MANAGER_ID", value: schemeFeeRepo.Fund_Manager_ID, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_SCHEME_FEE_ID", value: schemeFeeRepo.Fund_Manager_ID + schemeFeeRepo.Scheme_Id + schemeFeeRepo.Fee_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_SCHEME_ID", value: schemeFeeRepo.Scheme_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FEE_ID", value: schemeFeeRepo.Fee_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FLAT_OR_RATE", value: schemeFeeRepo.Flat_Or_Rate, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FLAT_OR_RATE_VALUE", value: schemeFeeRepo.Flat_Or_Rate_Value, dbType: DbType.Decimal, direction: ParameterDirection.Input); param.Add(name: "P_FIRST_ACCRUAL_DATE", value: schemeFeeRepo.First_Accrual_Date, dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_NEXT_ACCRUAL_DATE", value: schemeFeeRepo.First_Accrual_Date, dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_ACCRUAL_FREQUENCY", value: schemeFeeRepo.Accrual_Frequency, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FIRST_APPLY_DATE", value: schemeFeeRepo.First_Apply_Date, dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_NEXT_APPLY_DATE", value: schemeFeeRepo.First_Apply_Date, dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_APPLY_FREQUENCY", value: schemeFeeRepo.Apply_Frequency, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_LAST_ACCRUAL_DATE", value: schemeFeeRepo.First_Accrual_Date.AddDays(-1), dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_LAST_APPLY_DATE", value: schemeFeeRepo.First_Accrual_Date.AddDays(-1), dbType: DbType.Date, direction: ParameterDirection.Input); param.Add(name: "P_MAKER_ID", value: GlobalValue.User_ID, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_UPDATE_ID", value: GlobalValue.User_ID, dbType: DbType.String, direction: ParameterDirection.Input); con.Execute("MIX_PFM_SCHEME_FEE_FM", param, commandType: CommandType.StoredProcedure); } catch (Exception ex) { throw ex; } finally { if (con.State == ConnectionState.Open) { con.Close(); if (con != null) { con = null; } } } }
public bool DeleteRecordFM(pfm_SchemeFeeRepo SchemeFeeRepo) { try { //Get Connection AppSettings app = new AppSettings(); con = app.GetConnection(); DynamicParameters param = new DynamicParameters(); //Input Param param.Add(name: "P_SCHEME_FEE_ID", value: SchemeFeeRepo.Scheme_Fee_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_SCHEME_ID", value: SchemeFeeRepo.Scheme_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FEE_ID", value: SchemeFeeRepo.Fee_Id, dbType: DbType.String, direction: ParameterDirection.Input); param.Add(name: "P_FM_ID", value: SchemeFeeRepo.Fund_Manager_ID, dbType: DbType.String, direction: ParameterDirection.Input); int result = con.Execute(sql: "DEL_PFM_SCHEME_FEE", param: param, commandType: CommandType.StoredProcedure); if (result > 0) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } finally { if (con.State == ConnectionState.Open) { con.Close(); if (con != null) { con = null; } } } }