Exemplo n.º 1
0
        public void GetSystemDate(EndOfDayReversalRepo EODRepo)
        {
            var app = new AppSettings();

            using (OracleConnection conp = new OracleConnection(app.conString()))
            {
                try
                {
                    //Get connection
                    var con   = new AppSettings();
                    var param = new DynamicParameters();
                    param.Add("P_DATE_NOW", "", DbType.Date, ParameterDirection.Output);
                    con.GetConnection().Execute("SEL_DATE_NOW", param, commandType: CommandType.StoredProcedure);
                    EODRepo.System_Date = param.Get <DateTime>("P_DATE_NOW");
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conp.State == ConnectionState.Open)
                    {
                        conp.Close();
                        conp.Dispose();
                    }
                }
            }
        }
Exemplo n.º 2
0
        public void GetSchemeList(EndOfDayReversalRepo EODRepo)
        {
            var app = new AppSettings();

            using (OracleConnection conp = new OracleConnection(app.conString()))
            {
                try
                {
                    //Get connection
                    var con   = new AppSettings();
                    var param = new DynamicParameters();
                    param.Add("P_SCHEME_ID", EODRepo.Scheme_Id, DbType.String, ParameterDirection.Input);
                    param.Add("VDATA", "", DbType.String, ParameterDirection.Output);
                    con.GetConnection().Execute("SEL_SCHEME_NAME", param, commandType: CommandType.StoredProcedure);
                    EODRepo.Scheme_Name = param.Get <string>("VDATA");
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conp.State == ConnectionState.Open)
                    {
                        conp.Close();
                        conp.Dispose();
                    }
                }
            }
        }