public void Create_Units(Remit_Unit_MigrateRepo remitConLogdetailsrepo)
        {
            try
            {
                //Get Connection
                AppSettings app = new AppSettings();
                conn = app.GetConnection();
                DynamicParameters param = new DynamicParameters();

                param.Add(name: "p_PURCHASE_LOG_ID", value: remitConLogdetailsrepo.Purchase_Log_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "p_ESF_ID", value: remitConLogdetailsrepo.Esf_Id, dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "p_Employer_Units", value: remitConLogdetailsrepo.Employer_Units, dbType: DbType.Decimal, direction: ParameterDirection.Input);
                param.Add(name: "p_Employee_Units", value: remitConLogdetailsrepo.Employee_Units, dbType: DbType.Decimal, direction: ParameterDirection.Input);
                param.Add(name: "p_Purchase_Type", value: "MIGRATED UNIT", dbType: DbType.String, direction: ParameterDirection.Input);
                param.Add(name: "p_Unit_Price", value: 0, dbType: DbType.Decimal, direction: ParameterDirection.Input);

                conn.Execute("MIGRATE_UNIT_PURCHASES", param, commandType: CommandType.StoredProcedure);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                    if (conn != null)
                    {
                        conn = null;
                    }
                }
            }
        }
        public bool getPurchaseLog(Remit_Unit_MigrateRepo remitConLogdetailsrepo)
        {
            try
            {
                //Get connection
                var con   = new AppSettings();
                var param = new DynamicParameters();
                param.Add("P_PURCHASE_LOG_ID", remitConLogdetailsrepo.Purchase_Log_Id, DbType.String, ParameterDirection.Input);
                param.Add("VDATA", null, DbType.Int32, ParameterDirection.Output);
                con.GetConnection().Execute("SEL__MIG_PURCHASE_ID", param, commandType: CommandType.StoredProcedure);
                int paramoption = param.Get <int>("VDATA");

                if (paramoption <= 0)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }